[antlr-interest] Extending java.g

Imran A R (RBIN/EMT2) Imran.AR at in.bosch.com
Thu Feb 8 20:20:30 PST 2007


Hello all,

	I am extending java.g . I have one special requirement.
	whenever I see string "TE_" in a .java file, my parser should
not
	consider that line. It should just print the content of that
line
	and continue parsing the next line. How to do this?

	I tried following

	protected UNDEFINED_TOKEN :"TE_"	;

	compilation of .g file went fine. But when I run with a sample
file , throws error

	parser exception: T.java:4:1: unexpected token: .
	T.java:4:1: unexpected token: "TE_"
		        at
JavaRecognizer.compilationUnit(JavaRecognizer.java:209)
		        at Main.parseFile(Main.java:71)
		        at Main.doFile(Main.java:54)
		        at Main.main(Main.java:24)

	Thank you in Advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070209/4c342bef/attachment.html 


More information about the antlr-interest mailing list