[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yy_current_state, stuff
From: |
Vern Paxson |
Subject: |
Re: yy_current_state, stuff |
Date: |
Thu, 15 Mar 2001 14:37:30 PST |
> I want to be able to
> interrupt the scanner in the middle of scanning and be able to resume
> without problems. Such as this: the scanner has read the letters 'i' and
> then 'n' while in the INITIAL start condition, and then is interrupted,
> when it comes back to the scanner, in order for it to know that the 't'
> char it reads next makes it complete the rule for <INITIAL>"int" it needs
> to have the yy_current_state variable (declared in the yylex func) restored
> (in addition to the start condition vars, etc.)
This will be very hard to do. First, what does it mean to interrupt the
scanner? Like via a signal? There's no hook to abort scanning mid-token;
the scanner is sitting in a tight loop at that point.
Vern