On Tue, Oct 18, 2011 at 9:08 AM, Rampon Jerome <[email protected]>wrote:
> > > > Hi, > > > I noticed in the following link > > http://www.antlr.org/wiki/display/ANTLR3/1.+Lexer > the possibility to use lexer modes (controlled in the example via the > boolean tagMode settings in lexer rules) > > Is there one way to switch the lexer mode at grammar rule level or is it > only possible at lexer level ? > The parser also supports gated semantic predicates.While you may find more info about gated semantic predicates by using http://antlr.markmail.org/ and searching on "gated semantic predicate", if you are serious about using ANTLR, I would strongly suggest you buy http://pragprog.com/book/tpantlr/the-definitive-antlr-reference The book has the most accurate info on the subject less reading the source code. > Apparently @members declarations are not shared in both lexer and parser > and lexer::members, parser::members declaration are dedicated to the lexer > for the 1st one, > > and the parser for 2nd one > See: http://www.antlr.org/wiki/pages/viewpage.action?pageId=4882470 The lexer runs first and creates a list of tokens. Then the parser is feed the list of tokens created by the lexer. The parser does not communicate with the lexer. > > > One way to do it if not via @members ? > > Thanks > > Jerome > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > > > Hope this helps, Eric 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.
