Hi, ... You probably mean the genHashLines grammar option in C++ mode? http://www.antlr.org/doc/options.html#Options It's the last one in the table with...
3734
cormier@...
Jun 1, 2001 9:25 am
Hi, Nothing in JAVA mode? Christian ... cormier@......
3735
Kannaiyan Natesan
knatesan@...
Jun 1, 2001 9:32 am
Hi there, Use, KLexer kl = new KLexer(System.in); kl.getColumn(); <--- Will give you the column at anytime kl.getLine(); <-- will give you the Line Number at...
3736
jagee@...
Jun 1, 2001 1:32 pm
I had almost the exact problem and the way that I got around it was to create a pre-processor which would strip out the string between the [ and ]. Then...
3737
alansnyder2001@...
Jun 1, 2001 4:01 pm
Sinan, My problem was not that the r_TableExpression rule,it is in the joinedTable rule calling r_TableListItem . I will send this piece of code again ...
3738
John B. Brodie
jbb@...
Jun 1, 2001 6:54 pm
Here is what I came up with... Note you did not supply enuff of the rest of your grammar for me to use in actually trying it out using Antlr. So this is...
3739
Eric Mader
mader@...
Jun 1, 2001 8:00 pm
Hi, As a new ANTL user, I find that many of the error messages and warnings are difficult to understand. Is there some place I can go to find out what they ...
3740
Matthew Ford
Matthew.Ford@...
Jun 1, 2001 9:36 pm
Thanks for the idea, At present I am trying Monty's approach of a switch in the Lexer. using a stack for the whitespace context which holds the token to return...
3741
Mitch Britton
mitch_britton@...
Jun 3, 2001 9:38 am
Hi, I'm new to ANTLR - It seems a pretty good tool. Does anyone know of a C style preprocessor which has been built in Java - especially one done using ANTLR -...
3742
nwitcomb@...
Jun 4, 2001 3:30 pm
I have a grammer I would like to parse and there are some tokens which are arbitrary. Here is an example set parameter colour. The tokens set and parameter I...
3743
Sinan
sinan.karasu@...
Jun 5, 2001 11:40 pm
... You can try John Brodie's suggestion. You can also try predicates on alternatives until it goes away. Even if it doesn't, the resulting bad parser will...
3744
Pete Forman
pete.forman@...
Jun 6, 2001 12:41 pm
I'd like to implement a grammar in both Java and C++. Has anyone done this who might like to share their experiences? I'm guessing that I might write actions...
3745
Monty Zukowski
mzukowski@...
Jun 6, 2001 1:43 pm
You might consider using a literate programming tool like noweb. http://www.eecs.harvard.edu/~nr/noweb/. For the GCC grammar I used it to be able to group...
3746
Chuck Siska
chuck.siska@...
Jun 6, 2001 4:11 pm
monty -- i've used funnelweb successfully with antlr. it installs very easily on mswind systems. the syntax is slightly different from ramsey's noweb. for...
3747
iank@...
Jun 6, 2001 5:40 pm
As a fan of Knuth's work, I read his essays on literate programming. I was very excited about it until I got to the end of the essay, where he includes a...
3748
Chuck Siska
chuck.siska@...
Jun 7, 2001 1:03 am
comments interleaved... ... in using funnelweb, i've found that replacing the ink-heavy "@" with a ink-light backquote helps make the literate control ...
3749
Roberto Turrado Camblor
rturrado@...
Jun 8, 2001 1:29 pm
Hello!
I'd like to add error handling to the interpreter I'm doing. Until now, I do
not make use of any feature of antlr in order to handle errors. Lexer and...
3750
Jeff Vincent
JVincent@...
Jun 8, 2001 9:07 pm
Hey all, Two things: 1) I want to be able to allow nested comment blocks because I can't tell you how often I want to comment out a section of our scripting...
3751
Monty Zukowski
mzukowski@...
Jun 8, 2001 9:53 pm
Your rule would greedily eat the '*/' in ~ ('\n39; | '\r39;). In my C grammar I did: Comment ... ( { LA(2) != '/' }? '*' ... )* "*/" { _ttype =...
3752
clinton_olsen@...
Jun 9, 2001 8:16 pm
Hello: I think the best way to learn a new parser is to see an example for a language you already know. It so happens that Verilog is very pertinent to my...
3753
Ric Klaren
klaren@...
Jun 11, 2001 7:27 am
Hi, ... There's some preliminary doxygen docu on the C++ part on my antlr page. http://wwwhome.cs.utwente.nl/~klaren/antlr/ This is docu belonging to the...
3754
Ric Klaren
klaren@...
Jun 11, 2001 7:36 am
Hi, ... Try this one, it also reports where you started an unterminated comment, it's combined with a divide operator (/) in my lexer, which could of course be...
3755
Ruslan Zasukhin
sunshine@...
Jun 11, 2001 11:37 am
... By The way guys, I see that guru.com is very complex site, so its web masters can easy add online DATABASE of such small examples/tricks Can be fields: ...
3756
danreo1952@...
Jun 11, 2001 6:31 pm
Hello: I have a "complete" Cobol grammer. It's at: http://adam.wins.uva.nl/~x/grammars/vs-cobol-ii/ Problem: I know it is grammer and I was wondering if the...
3757
Jeff Vincent
JVincent@...
Jun 11, 2001 6:37 pm
Why does this pass through ANTLR with no problems in a Lexer rule: { String t = $getText.substring(2); $setText(Integer.parseInt(t, 16)); } but this give a...
3758
Ernest Pasour
sasecp@...
Jun 11, 2001 6:39 pm
try adding a space before '$getText39; (i.e. after the open paren) ... From: Jeff Vincent [mailto:JVincent@...] Sent: Monday, June 11, 2001 2:37 PM To:...
3759
Monty Zukowski
mzukowski@...
Jun 11, 2001 7:02 pm
It looks like things in [] are optional and would translate to ()*. The || should be | in antlr. Finding a spec of their extensions of BNF would help. Monty...
3760
Luke Blanshard
Luke@...
Jun 11, 2001 7:36 pm
... Shouldn't that be "()?"?...
3761
Monty Zukowski
mzukowski@...
Jun 11, 2001 8:47 pm
... Yes! Thanks Luke, Monty...
3762
Jeff Vincent
JVincent@...
Jun 11, 2001 9:29 pm
Still nothing. $setText( "" + Integer.parseInt( $getText.substring( 1 ) , 8 ) ) ; "Syntax error in action: line 93: unexpected char: ." ... try adding a space...