On 8/3/10 2:14 PM, Lukas Renggli wrote:
Hi Alberto,
This is great news. Maybe you also want to post the repository URL? :-)
Sure, please don't be too much horrified by the quality of the code:
http://www.squeaksource.com/PetitJava.html
For what you noticed on bogus grammar specifications check out the work of Vadim Zaytsev (http://mobile.twitter.com/grammarware). Among others he analized various Java Language Specifications.
That's interesting, thank you!
Note that cycles are present in most grammars and perfecly fine. The only problematic cycles are the left-recursive ones for recursive descent parsers like ANTLR or PetitParser. Even then you can simply fix the problem by adding a memoizer into the offending cycle, but that yields a very slow grammar. You can find offending cycles with the message #cycleSets from the PetitAnalyzer package.
I tried using the "cycle" tab in the PetitParser GUI, which -I think- does the same thing. Knowing how to call it programmatically is even better ;)
Alberto
this is really nice to have a full java parser for moose... even if the problem after will be a semantics analysis.
Stef
On Aug 3, 2010, at 2:39 PM, Alberto Bacchelli wrote:
On 8/3/10 2:14 PM, Lukas Renggli wrote:
Hi Alberto,
This is great news. Maybe you also want to post the repository URL? :-)
Sure, please don't be too much horrified by the quality of the code:
http://www.squeaksource.com/PetitJava.html
For what you noticed on bogus grammar specifications check out the work of Vadim Zaytsev (http://mobile.twitter.com/grammarware). Among others he analized various Java Language Specifications.
That's interesting, thank you!
Note that cycles are present in most grammars and perfecly fine. The only problematic cycles are the left-recursive ones for recursive descent parsers like ANTLR or PetitParser. Even then you can simply fix the problem by adding a memoizer into the offending cycle, but that yields a very slow grammar. You can find offending cycles with the message #cycleSets from the PetitAnalyzer package.
I tried using the "cycle" tab in the PetitParser GUI, which -I think- does the same thing. Knowing how to call it programmatically is even better ;)
Alberto _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
It's great indeed. At the very least we will be able to have color highlighting and parsers for various pattern matching.
Cheers, Doru
On 3 Aug 2010, at 14:49, Stéphane Ducasse wrote:
this is really nice to have a full java parser for moose... even if the problem after will be a semantics analysis.
Stef
On Aug 3, 2010, at 2:39 PM, Alberto Bacchelli wrote:
On 8/3/10 2:14 PM, Lukas Renggli wrote:
Hi Alberto,
This is great news. Maybe you also want to post the repository URL? :-)
Sure, please don't be too much horrified by the quality of the code:
http://www.squeaksource.com/PetitJava.html
For what you noticed on bogus grammar specifications check out the work of Vadim Zaytsev (http://mobile.twitter.com/grammarware). Among others he analized various Java Language Specifications.
That's interesting, thank you!
Note that cycles are present in most grammars and perfecly fine. The only problematic cycles are the left-recursive ones for recursive descent parsers like ANTLR or PetitParser. Even then you can simply fix the problem by adding a memoizer into the offending cycle, but that yields a very slow grammar. You can find offending cycles with the message #cycleSets from the PetitAnalyzer package.
I tried using the "cycle" tab in the PetitParser GUI, which -I think- does the same thing. Knowing how to call it programmatically is even better ;)
Alberto _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Relationships are of two kinds: those we choose and those that happen. They both matter."