At 05:06 AM 11/4/2009, you wrote: >Hello Jim, Gerald > >@ Jim: I suppose you are referring to the much larger grammar I've >mentioned in the initial post by "myriad syntactic predicates". However, >this is why I extracted this (quite simple) example, which has a single >syntactic predicate and yet fails to perform the recognition. On the other >hand, the rule associative_dimension_1 *is* left-factored, and re-writing >it using a syntactic predicate (as associative_dimension_2) made the >grammar work in the first place. >Indeed, choosing k=1 fixes the problem, but I still don't understand if >this change is reliable as a global change in the "much larger grammar". > >@ Gerald: At the moment I'm trying to install AntlrDT in order to reproduce >the diagrams and better understand what exactly is the difference between >rules associative_dimension_1 and _2. It seems that eclipse has loaded the >plugin, but I don't find any new perspective/view/editor.
The diagrams show the exact path taken by the parser. When live, you can click through the diagrams to the parser/lexer rules and input text, so it makes understanding a bit easier. As for installation, did you install the requirements? http://www.certiv.net/projects/antlrdt.html#requirements Tip: when installing, turn off "Group items by category" -- makes finding the dependencies easier. Restart with "-clean" Verify the install by checking Help->About->Installation details->Plugins Check in Help->About->Installation details->Configuration for problems with the run-time initialization of the plugin. If in doubt, send me a copy off-list. >However, I don't see why the recognition would treat differently the two >subrules which I find equivalent (i.e. why doesn't the parser follow >sized_or_unsized_dimension when using _1). That k=1 is suspect. It looks like it is also restricting the predicate lookahead. If you cannot remove it, then Jim's comments apply even stronger. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
