[antlr-interest] handling abbreviated keywords in ANTLR
shaun at ebi.ac.uk
shaun at ebi.ac.uk
Sun Jul 8 13:06:09 PDT 2007
Hi,
I need to parse a language which allows abbreviated keyword definitions (I
have at least 52 keywords). For example, each of the following
'application' definitions is deemed valid:
'application : helloworld'
'appl : helloworld'
'applic : helloworld'
or 'sequence : dna' - 'seq : dna'
I need to recognise and match keyword variants to their complete
definition. I am using ANTLR 3. Which is the best way to handle this
recognition problem? In the lexer or parser?
Thank you,
Shaun
More information about the antlr-interest
mailing list