[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reset a scanner
From: |
John Millaway |
Subject: |
Re: reset a scanner |
Date: |
Thu, 1 Aug 2002 21:43:58 -0700 (PDT) |
> I want to know how to reset it properly
> after it catches a error(wrong content, wrong token, etc.).
Several choices come to mind:
+ halt everything by returning 0 or calling yyterminate()
* pass the error up to the parser by returning an unexpected token.
* record the error, but otherwise continue scanning the next token.
* jump to an error state (a start condition) in which you look for
a certain pattern to re-sync the scan, such as "\n" or ";" or "}".
* REJECT the current rule and try to match a different rule
-John
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
- reset a scanner, Yiping Guan, 2002/08/01
- Re: reset a scanner,
John Millaway <=