Hello, I'm very sorry to be posting so many questions, I'm afraid I have another. I'd also like to thank the people who have responded to me! I'm looking to...
If both whitespaces and ':' should be ignored then: class CSVLexer extends Lexer; options{filter=IGNORE;} preotected IGNORE ... '\t ... ; No need to manually...
Hello, I'm sorry to post another newbie question but I stumped! I'm looking at the example to ignore whitespace. The text I'm trying to tokenise is:- Assay:...
I fixed a bug today dealing with the tree parser codegen. My grammer files uses all three types: a parser, a lexer and a tree parser. The token file generated...
I modified the section in genBlockFinish to eliminate the break in the default condition of the case statements if it isn't reachable due to the throwing of an...
Can someone please help me? I need to write the following functions coded SEPARATELY, then write a main program for each of them to test them: 1) Validate...
Hello, I'm attempting to parse something like:- Comment: User , This is a comment MachineID: System , fusion1 I have worked out how to get the token split up...
Hello antlr users. I faced a problem with the Parser generated by antlr, and have possibly dicovered a bug in the code generated. From a rule declared as: ...
... significance of whitespace. That's right, the parser can't communicate back to the lexer. I would recommend that your lexer enforce the white space rules...
I read about ignoring whitespace in the lexer, but it's not what I need. If I have a language where whitespace is permitted most places, e.g., between...
OK... now I know of its existence I want one - what an impetuous society we live in ;-) Ter, any chance of snagging the implementation of your documentation...
Hello, I am a new person to ANTLR. I have made some progress but am having some problems. The code beneath is simply to tokenize a CSV file. However I am...
I am not sure to be right, but it seems that to obtain the right included file name when error occurs, needs to add some code like this! Right? With...
I was wondering if there any way to look ahead while parsing a Tree. I know that in a recognizer you can use the LA(1) to test the next token, can I do ...
Hello all, I have to parse the following macro: Syntax: define <macro-name39;nonterminal-type> match-string as {"replacement"} Syntax example: define...
I have tried recently to build antlr on Solaris (5.7) using gcc (2.95.2 19991024) and jdk 1.3.1. In summary I think that the build process needs to be...
I am starting to use 2.7a2. I have a simple grammer file with just one rule. I am trying to link the files CC file.o file2.o -lantlr using the libantlr.a It...
In the documentation is mentioned that the labeled subrules will be implemented in an other way. Does this mean that in the next release of antlr it will not...
Hi, I would like to propose to my company to use antlr for parser generation, and would like to propose the latest 2.7.2a version ... Due to political reasons,...
ANTLR was generating static arrays that were huge for my lexer.
It made Java complain about the method being too big (over 65535
bytes).
I hacked the ANTLR...
or make a top level rule that calls a protected TEXT with the correct value, e.g. TOP_TEXT: TEXT(false); Monty ... http://docs.yahoo.com/info/terms/...
Where is that param coming from? nextToken() doesn't know anything about it. It doesn't make sense to have a parameter passed in to a non-protected rule in...
I am facing a difficulty with a parser I am writing and need some help. The program should parse ASP which has html tags and code written in JavaScript or...
I got ANT 2.7.2 and got rid of the previous problem. Thanks guys. Looks like I'm onto the next one. I pasted the rule and code fragment at the end of this...
For some reason when I use the charVocabulary option in the following grammar, I get code that CANNOT be compiled. When I remove it, I get compilable code. Is...
In building a compiler, I want to preprocess the source file and build the symbol table first,but the grammar file is very large,so I hope to only analyse...
Here's a newbie parser question. I'm trying to produce a hierarchical AST tree from a C++ source file. My lexer works over the 400K codebase, but when I walk...
If I have the following in a lexer: FOO ... ; BAR ... ; What I want is that if isFoo() is false, then the more generic rule BAR to be used. Is the above...