- 论坛徽章:
- 0
|
Three routines are available for manipulating stacks of start conditions:
`void yy_push_state(int new_state)'
pushes the current start condition onto the top of the start condition stack and switches to new_state as though you had used `BEGIN new_state' (recall that start condition names are also integers).
`void yy_pop_state()'
pops the top of the stack and switches to it via BEGIN.
`int yy_top_state()'
returns the top of the stack without altering the stack's contents.
The start condition stack grows dynamically and so has no built-in size limitation. If memory is exhausted, program execution aborts.
To use start condition stacks, your scanner must include a `%option stack' directive (see Options below).
push难道是直接转状态了 (as though you had used `BEGIN new_state' )
[ 本帖最后由 wilbur8415 于 2008-2-10 18:48 编辑 ] |
|