Hi, there is a nice feature in LLK http://llk.sourceforge.net that allows certain semantic actions to be executed even when guessing in syntactic predicates....
9921
Oliver Zeigermann
djcordhose
Nov 7, 2003 9:16 am
Another nice feature of LLK http://llk.sourceforge.net is that it allows to specify lookahead depth locally per block. This allows for more efficient parsing...
9922
Joshua Davis
pgmjsd
Nov 7, 2003 1:01 pm
ANTLR newbie question: I've been having a similar problem I think. I made a very simple grammar based on L. V.'s grammar. It seems to be always producing ...
9923
Gustav Boström
i93gusbo
Nov 7, 2003 5:12 pm
Hi! Thanks for the help! I think I'm trying the same thing as you, but also without luck. I try to do: sql_stmt : sql_data_stmt { #sql_stmt =...
9924
lgcraymer
Nov 7, 2003 7:00 pm
Oliver-- ANTLR is actually quite a bit smarter about lookahead--k is maximum lookahead, and ANTLR generates minimum lookahead. If you set k=20 but don't need...
9925
hawkwall
Nov 7, 2003 8:09 pm
Hello, I need to match the following data NUMBER.OF.SURFACE: 3 NUMBER.OF.STANDALONE: 5 Where all I am really concered about is that the surface has a number 3,...
9926
hawkwall
Nov 7, 2003 8:34 pm
Why is it I can't figure something out until I post to the newsgroup? I think I have a solution. My predicate was wrong on the type STANDOFF. Changing it...
9927
Jim O'Connor
tiucsibgib
Nov 7, 2003 8:47 pm
Hi Mike, First, to point out an oversite. rule1 : "Standalone"; rule2 : "Surface"; Grammar : rule1 rule2; // translates to "Standalone Surface" Input: "Surface...
9928
lgcraymer
Nov 7, 2003 10:35 pm
Mike-- It looks like you are doing a lot in the lexer. That's okay if your problem is fairly static, but you may trip over that if you end up doing more...
9929
hawkwall
Nov 8, 2003 3:36 am
Jim, You are right about the oversight, I missed that when I copied in the post. I will look at the testLiterals option and play with it. Thanks for taking...
9930
Joshua Davis
pgmjsd
Nov 8, 2003 7:10 am
My example is even simpler. It's *supposed* to generate a node for every rule if the buildAST is set to true isn't it? I was under the impression that...
9931
lgcraymer
Nov 8, 2003 8:32 am
Mike-- Ah--perl is a useful tool, but it can warp the mind. Good ANTLR development practice is that Lexers are for separating input into tokens; while parsing...
9932
John D. Mitchell
johnm-antlr@...
Nov 8, 2003 5:36 pm
... [...Analysis lookahead vs. programmer lookahead vs. runtime lookahead...] IMU, the biggest reason that the specification knob exists for setting k equal to...
9933
Oliver Zeigermann
djcordhose
Nov 8, 2003 9:35 pm
Hi Loring! ... Hmmm. Is this true? Definitly not when using greedy blocks... Have a look at this simple grammar top : TOKEN0 (sub | top )* TOKEN3 ; sub :...
9934
hawkwall
Nov 9, 2003 3:01 am
I am still missing something. The following runs as I expect, and the action is executed. Input: THREAT.CLASSES.110 NUMBER.OF.SURFACE.TO.AIR.THREAT.CLASSES:...
9935
leung13512c
Nov 9, 2003 6:36 am
Hi, this is Chris Leung, author of LLK. I am just one of many to write open source software to kill time (somebody may mistaken that as xxx ms). Thanks for all...
9936
lgcraymer
Nov 9, 2003 6:44 am
... maximum lookahead, and ANTLR generates minimum lookahead. If you ... lookahead in the generated code. I think that Sriram put local ... grammar debugging...
9937
leung13512c
Nov 9, 2003 6:46 am
My view about the local lookahead depth is that it is safer to use than fixed/syntax lookahead which given the alternative priority over other alternatives...
9938
lgcraymer
Nov 9, 2003 10:18 am
Chris-- Welcome! The performance differential is not a surprise--that39;s sort of an artifact of ANTLR 2's history. Ter was too busy with jGuru to do much...
9939
John D. Mitchell
johnm-antlr@...
Nov 9, 2003 5:30 pm
... [...] ... From a theoretical standpoint? Nope, I can't see how you've increased the power at all. From a "what39;s easiest/most-efficient to do with...
9940
leung13512c
Nov 10, 2003 1:39 am
The thing that caused me to switch away from ANTLR syntax is because I prefer the tree building syntax of JJTree that always create imaginary nodes instead of...
9941
Oliver Zeigermann
djcordhose
Nov 10, 2003 5:40 am
... I had an example that was much more of theoretical interest (I do not recall right now, but could look it up). On the more practical side same grammars...
9942
Oliver Zeigermann
djcordhose
Nov 10, 2003 5:48 am
... I have to admit I really do not recall my example of a language that can not be parsed without it, but can with it. Maybe I am mistaken, but have to think...
... Loring, are you really serious about this? Have a look at the DOM vs. SAX discussion in the XML area... Oliver...
9945
Oliver Zeigermann
djcordhose
Nov 10, 2003 7:39 am
... such. I ... indicates a ... this ... increased the ... tool/framework/etc. XYZ"? ... can ... have ... Still can not remember my example, but here is some...
9946
Oliver Zeigermann
djcordhose
Nov 10, 2003 7:41 am
... the ... ) ... ) ... It does not work. This grammar would accept 1001 (etc.) stars followed by a single '#' as well. Oliver...
9947
lgcraymer
Nov 10, 2003 8:30 am
... followed ... Yes, but those would be labeled as "STAR_WORD" instead of your two choices--that39;s enough to ensure that an exception is thrown in the parser....
9948
lgcraymer
Nov 10, 2003 9:21 am
... have ... had ... a ... virtual ... problem ... overhead ... Of course. Large memory machines are a recent luxury, and it is not hard to use disks...
9949
Tom Moog
tmoog@...
Nov 10, 2003 2:11 pm
I remember that John Lilley required the use of actions inside guess blocks to parse C++. I believe that parsing some C++ declarations which make use of...