[antlr-interest] setting the line number

Ric Klaren klaren at cs.utwente.nl
Mon Sep 20 09:07:11 PDT 2004


On Mon, Sep 20, 2004 at 04:46:49PM +0200, Peter Sprenger wrote:
> I want to process "#line" statement in a Mini-C parser, but had
> not much success to set a new line number that is increased with
> newline(); and is reported to Error exceptions.

Not 100% sure if this is in the 2.7.4 release but all lexers should have a
setLine/Column method with which you can change the line position of the
inputBuffer (see the CharScanner.hpp for what happens) (if it's not in
2.7.4 copy over the relevant bits from the latests snapshot or use the
latter)

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++-------
  "You know how to use that thing?" [pointing to the sword]
  "Sure.. The pointy end goes into the other guy."
  --- The Mask of Zorro



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list