[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

filter() method

Would it be possible to add "throws LexerException" to the Lexer.filter()
method signature?

For example, if you're parsing a doubly quoted string and read an
EOF token.

There's no way in the grammar to indicate that this is not valid input
(ie, reading EOF in state "DQUOTE" or whatever). So the filter() routine
sees the EOF in state DQUOTE, and needs to throw a LexerException.


Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com