[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yy_current_state, stuff
From: |
Kingpin |
Subject: |
Re: yy_current_state, stuff |
Date: |
Thu, 15 Mar 2001 13:12:40 -0500 (EST) |
This is how you normally start the scanner in a certain state (see
page 172 of the O'Reilly book). How is your case different?
%s MY_STATE
%{
static int first_time = 1;
%}
%%
%{
if (first_time) { BEGIN MY_STATE; first_time = 0; }
%}
<MY_STATE>pattern ...
--
- - Martin "Kingpin" Thurn address@hidden
Research Software Engineer (703) 793-3700 x2651
The Information Refinery http://tir.tasc.com
TASC, Inc. http://www.tasc.com
That wizard's just a crazy old man. -- Owen, Star Wars