[antlr-interest] Is there a way to convert the input stream to uppercase for parsing
David J. Biesack
David.Biesack at sas.com
Tue Sep 14 11:29:31 PDT 2010
Hitesh;
Check the ANTLR FAQ "How do I get case insensitivity?"
http://www.antlr.org/wiki/pages/viewpage.action?pageId=1782
> Date: Tue, 14 Sep 2010 16:04:45 +0530
> From: Hitesh Shetty <hitesh.p.shetty at gmail.com>
>
> Hello,
> Im trying to convert an existing grammar written for C target into one for Java.
> In the C grammar there exists an init section which I figured
> converted the input stream into lowercase, as:
> @init {
> ANTLR_UINT32 (*oldLA) ( struct ANTLR3_INT_STREAM_struct *, ANTLR_INT32 );
> oldLA = INPUT-> istream->_LA;
> INPUT->setUcaseLA(INPUT, ANTLR3_FALSE);
> }
> Is there any equivalent way of doing this for the Java target?
> Any help would be appreciated.
--
David J. Biesack, SAS
SAS Campus Dr. Cary, NC 27513
www.sas.com (919) 531-7771
More information about the antlr-interest
mailing list