[antlr-interest] lexer: suffixes and case insensitivity
Edwards, Waverly
Waverly.Edwards at genesys.com
Mon Aug 20 01:25:20 PDT 2007
is there a way to deal with old style BASIC variables?
I am replicating a dialect of BASIC that optionally uses suffixes for
variable types.
varName // no suffix, determined by dim type, dim varName as type
varName$ // string
varName$$ // container ( like a string but much bigger )
varName# // double precision
varName! // single precision
varName` // signed byte
varName% // signed integer
varName& // signed long integer
varName`` // unsigned byte
varName%` // unsigned integer
varName&` // unsigned long integer
Three ways that I can type a primitive variable type
dim as unsigned long varName // typed as unsigned long
dim varName as unsigned long // typed as unsigned long
dim varName&` // also and unsigned long by way of
suffix "&`"
Can this type of mapping be handled by the ANTLR lexer where
the lexer knows how to match varName%` before varName%
Still reading the site, still learning.
Thank you,
W.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070820/f3b15fc3/attachment.html
More information about the antlr-interest
mailing list