-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion Failure in Parsegenapp with supplied grammar #10
Comments
Thanks! Only had time to glance at this so far... The problem is apparently only an Assertion Failure in Debug builds of the GenApp. The GenApp is choking on the
In This is the tree representation of the
|
in my nearly nonexistent grammar knowledge if you could explain what that comment means that would be very helpful. the way I believe it is set up looks like: A = B C* As a small background, the expr is the biggest headache i?ve had. expr ::= which is 100% absolutely the definition of left recursion. I attempted my self to remove it and failed miserably. So I converted it to the ANTLR grammar that would (potentially) remove it for me. It did remove the left recursion but certainly made the rule much more ugly
Thanks again On Apr 9, 2014, at 12:53 PM, Todd Ditchendorf notifications@github.com wrote:
|
My comment was more for my own reference when I have time to look more closely into this :). 3 things:
|
great. thanks for your support. On Apr 9, 2014, at 1:10 PM, Todd Ditchendorf notifications@github.com wrote:
|
BTW, I remembered that I had tried my hand at the sqlite grammar in the ParseKit days: https://github.com/itod/parsekit/blob/master/res/sqlite.grammar Looks like I never finished... |
I noticed that in your test cases and poked around a bit. I too looked at their nice diagrams that are so readily available but trying to go from diagram and nested diagrams to code was much harder for me than from their file that generates it… 95% of the work was already done with all the rules written out. I’m hope I can get it to work as it would be a very nice asset for the app i’m working on. Really enjoying working with grammars again. Last time was a compilers course where we used the java book you recommend. quite a different grammar than static java that we worked on. Thanks again for the great tool. On Apr 9, 2014, at 8:10 PM, Todd Ditchendorf notifications@github.com wrote:
|
Probably already got this far, i just had a chance to work on the grammar again and was able to change the expr rule to be :
this generates the parser just fine and I don't think it changed the language definition. |
I have a grammar that I translated from:
http://www.sqlite.org/docsrc/doc/trunk/art/syntax/all-bnf.html
It is an extremely rough draft of the grammar but is complete. I took what was in the above site and converted it into an ANTLR valid grammar and was able to generate parsing code from the grammar so I know that the syntax and rule definitions are correct and syntactically valid. Other subtle gotchas are sure to abound. But this is not a request to fix the grammar but to provide it as an example of something that will hard crash the ParseGenApp.
again this is not asking for a grammar fix or anything like that (but you're welcome to as well) but just an a data set that crashes the app hard.
Thanks for the great tool!
If there is a better way to provide these types of bugs/issues let me know
parsegen grammar
Here is the ANTLR grammar that is successful:
(all ':' converted to '=' and ID converted to Word)
The text was updated successfully, but these errors were encountered: