[antlr-interest] case-insensitive parsing

Dave Dutcher dave at tridecap.com
Thu Apr 23 06:32:11 PDT 2009


Hi,

I'm also fairly new to Antlr, but I would suggest improving how the lexer
handles your comments.  I don't think case insensitivity is your problem,
because it sounds like that is working fine.  I think your problem is that
you are trying to parse arbitrary english in the comment which is ambiguous
with the rest of your grammar.  Perhaps you could find an example of lexing
javadoc comments on the antlr site, but I imagine you will need to use .*
style constructs to pull the english words into one token.

Dave



	From: Bob Sole
	Sent: Thursday, April 23, 2009 7:42 AM
	
	Hi Andreas,
	
	Unfortunately that won't help me in this case, because I still need
to be able to parse the contents of the comments. The overall aim is to
extract Javadoc-style tags such as "@param" from the comment section and
match them to procedure parameters, e.g.
	
	/** this procedure does nothing much
	  @param aString this is a string
	  @param anInt this is a number
	*/
	PROCEDURE thingy(aString IN VARCHAR2, anInt IN OUT NUMBER);
	



More information about the antlr-interest mailing list