On 4 March 2011 at 11:22 Lennart Kats tagged parser

On 4 March 2011 at 11:22 Lennart Kats tagged @lennartkats

On 4 March 2011 at 11:22 Lennart Kats tagged @maartje

On 4 March 2011 at 11:23 Lennart Kats tagged interesting

On 4 March 2011 at 11:28 Lennart Kats tagged 1.0

On 4 March 2011 at 11:29 Lennart Kats commented:

The build url you indicated seems to succeed?


On 4 March 2011 at 11:32 Rob Vermaas commented:

Probably copied the wrong URL. Just try to parse the mentioned files with JSGLR and parse-stratego.


On 4 March 2011 at 11:32 Rob Vermaas commented:

Ah, the url is probably the strategoxt.jar build I used (look at build inputs tab to see which svn revision it was)


On 4 March 2011 at 11:49 Lennart Kats commented:

Ah. I don’t suppose you made a Java version of parse-stratego yet? The files depend on heuristic filters that are not enabled in the normal jsglr command-line tool… I suppose it needs a command-line option for that. Anyway, I’ll try to look into it when I have some more time.


On 4 March 2011 at 11:55 Rob Vermaas commented:

Well, as it goes wrong during running of stratego java compiler, I would think it is using parse-stratego strategies, and therefore it might be a parse-stratego (in java) bug ?


On 4 March 2011 at 12:00 Rob Vermaas commented:

in strategoxt-java-backend/java/runtime/org/strategoxt/lang/compat/override/jsglr-parser-compat.str there is :


override parse-string-pt(on-parse-error | tbl, start-symbol, path) =
stream -> term
where
read-text-from-stream;
jsglr-parse-string-pt(on-parse-error |tbl, start-symbol, path) => term

which is used by parse-stratego.


On 11 March 2011 at 17:42 Lennart Kats commented:

Ah, but there actually is an option for JSGLR to parse with heuristic filters. We need a --help option.

I tried two files:


$ java -cp java/strategoxt.jar org.spoofax.jsglr.Main –heuristic-filters on -p syn/Stratego-Stratego-Java-15.tbl -i trans/variable-access.str –implode | pp-aterm

(…lots of output, no amb…)

$ java -cp java/strategoxt.jar org.spoofax.jsglr.Main –heuristic-filters on -p locate1 Stratego-Sdf2.tbl -i java/tools/org/strategoxt/tools/lib/gen-renamed-sdf-module.str –implode | pp-aterm | less

(…lots of output, no amb…)

So I can’t seem to reproduce it? Can you reproduce it in this way? Maybe the problem is that the compiler doesn’t properly configure the parser?


On 14 March 2011 at 09:39 Rob Vermaas commented:

I must have messed something up here, indeed there are no amb’s (anymore?). However, if you compare the output of


$ sglri –heuristic-filters on -p locate1 Stratego-Sdf2.tbl -i java/tools/org/strategoxt/tools/lib/gen-renamed-sdf-module.str | pp-aterm | less

with

$ java -cp java/strategoxt.jar org.spoofax.jsglr.Main –heuristic-filters on -p locate1 Stratego-Sdf2.tbl -i java/tools/org/strategoxt/tools/lib/gen-renamed-sdf-module.str –implode | pp-aterm | less

you get the following diff (diff c java):


140c140
< prod(meta-listvar(“A*”), sort(meta-var(“S”)), meta-var(“$”))

                  prod([meta-var("A*")], sort("S"), meta-var("$"))

142c142
< , ToTerm(sort(meta-var(“S”)))

              , ToTerm(sort("S"))

150,151c150,151
< meta-listvar(“A*”)
< , cf(sort(meta-var(“S”)))

                      [meta-var("A*")]
                    , cf(sort("S"))

155c155
< , ToTerm(sort(meta-var(“S”)))

                , ToTerm(sort("S"))

162,163c162,163
< meta-listvar(“A*”)
< , lex(sort(meta-var(“S”)))

                      [meta-var("A*")]
                    , lex(sort("S"))

167c167
< , ToTerm(sort(meta-var(“S”)))

                , ToTerm(sort("S"))

178,179c178,179
< ToTerm(sort(meta-var(“S1”)))
< , ToTerm(symbol(sort(meta-var(“S1”)), sort(meta-var(“S2”))))

        ToTerm(sort("S1"))
      , ToTerm(symbol(sort("S1"), sort("S2")))

193c193,195
< , [imports([renamed-module(meta-var(“M1”), renamings(meta-listvar(“ro*”)))])]

          , [imports(
               [renamed-module(meta-var("M1"), renamings([meta-var("ro*")]))]
             )]


On 14 March 2011 at 10:15 Lennart Kats commented:

Rob gave this another try, now with the comparing C-SGLR (left) with JSGLR+implode-asfix:


139,142c139,140
< ToTerm(
< prod(meta-listvar(“A*”), sort(meta-var(“S”)), meta-var(“$”))
< )
< , ToTerm(sort(meta-var(“S”)))

                ToTerm(prod(meta-listvar("A*"), sort("S"), meta-var("$")))
              , ToTerm(sort("S"))

149,153c147
< prod(
< meta-listvar(“A*”)
< , cf(sort(meta-var(“S”)))
< , meta-var(“$”)
< )

                    prod(meta-listvar("A*"), cf(sort("S")), meta-var("$"))

155c149
< , ToTerm(sort(meta-var(“S”)))

                , ToTerm(sort("S"))

161,165c155
< prod(
< meta-listvar(“A*”)
< , lex(sort(meta-var(“S”)))
< , meta-var(“$”)
< )

                    prod(meta-listvar("A*"), lex(sort("S")), meta-var("$"))

167c157
< , ToTerm(sort(meta-var(“S”)))

                , ToTerm(sort("S"))

178,179c168,169
< ToTerm(sort(meta-var(“S1”)))
< , ToTerm(symbol(sort(meta-var(“S1”)), sort(meta-var(“S2”))))

        ToTerm(sort("S1"))
      , ToTerm(symbol(sort("S1"), sort("S2")))

Notice how the (likely harmless) meta-listvar problem is gone now. What remains is a problem that sounds a lot like Spoofax/352.

It also seems to be a parser issue then, rather than an imploder issue.


On 14 March 2011 at 10:18 Lennart Kats tagged composition

On 14 March 2011 at 10:23 Rob Vermaas commented:

Running the java parse without –implode and with implode-asfix, I get following diff:


139,142c139,140
< ToTerm(
< prod(meta-listvar(“A*”), sort(meta-var(“S”)), meta-var(“$”))
< )
< , ToTerm(sort(meta-var(“S”)))

                ToTerm(prod(meta-listvar("A*"), sort("S"), meta-var("$")))
              , ToTerm(sort("S"))

149,153c147
< prod(
< meta-listvar(“A*”)
< , cf(sort(meta-var(“S”)))
< , meta-var(“$”)
< )

                    prod(meta-listvar("A*"), cf(sort("S")), meta-var("$"))

155c149
< , ToTerm(sort(meta-var(“S”)))

                , ToTerm(sort("S"))

161,165c155
< prod(
< meta-listvar(“A*”)
< , lex(sort(meta-var(“S”)))
< , meta-var(“$”)
< )

                    prod(meta-listvar("A*"), lex(sort("S")), meta-var("$"))

167c157
< , ToTerm(sort(meta-var(“S”)))

                , ToTerm(sort("S"))

178,179c168,169
< ToTerm(sort(meta-var(“S1”)))
< , ToTerm(symbol(sort(meta-var(“S1”)), sort(meta-var(“S2”))))

        ToTerm(sort("S1"))
      , ToTerm(symbol(sort("S1"), sort("S2")))


On 14 March 2011 at 15:25 Lennart Kats tagged major

On 23 November 2011 at 17:57 Lennart Kats tagged 1.1

On 23 November 2011 at 17:57 Lennart Kats removed tag 1.0

On 23 November 2011 at 17:58 Lennart Kats removed tag interesting

On 8 January 2013 at 12:56 Eelco Visser removed tag 1.1

On 8 January 2013 at 12:56 Eelco Visser tagged interesting

On 8 January 2013 at 15:06 Eelco Visser tagged sdf

On 8 January 2013 at 16:09 Eelco Visser removed tag @lennartkats

Log in to post comments