[antlr-interest] Example of plugging in custom lexer to C-target?

scott_boag at us.ibm.com scott_boag at us.ibm.com
Mon Sep 13 07:37:07 PDT 2010


Hello all,

I apologize if this information is in some obvious place... so far I've 
not been able to locate it.

I would like to plug in a custom lexer to the C target generation.  To be 
specific, I want to plug in a Flex C++ lexer.  In Java I do this with 
JFlex, and it's really simple.  But I'm trying to reverse engineer the 
Lexer/TokenStreams/TokenSource/etc. for the C target, and it looks to be 
fairly tricky.  I'm hoping someone might have an example to make this a 
bit simpler?

(I'm constrained at the moment to 3.1.3).

Thanks!


More information about the antlr-interest mailing list