[antlr-interest] help - Parser problem

virg g 06virg at gmail.com
Wed Dec 3 03:43:39 PST 2008


On Wed, Dec 3, 2008 at 4:26 PM, Gavin Lambert <antlr at mirality.co.nz> wrote:

> At 23:05 3/12/2008, virg g wrote:
>
>> 1.  As i have set of commands to parse
>> if there is any unknown command found it breaks the parsing and returns
>> with the error. But how to continue the parsing  even though it finds
>> unknown command after returning the error.
>>
>
> Normally ANTLR will try to continue regardless, though it depends on how
> your grammar is structured and which version of ANTLR you're using.


I am using antlr 3.1

>
>
>  2. Added package at the beginning of header to grammar code. I could see
>> the package name for parser file but not for the lexer. Why?
>>
>
> @header { foo } is just shorthand for @parser::header { foo }, when used in
> a combined grammar.
>
> It's better to explicitly use @parser::header { foo } and @lexer::header {
> bar }.
>

Ok, Thanks, I am able to see package in the lexer file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081203/b181d40a/attachment.html 


More information about the antlr-interest mailing list