- 论坛徽章:
- 0
|
info flex
这种基本的能力你自己要会。
- `-R, --reentrant, `%option reentrant''
- instructs flex to generate a reentrant C scanner. The generated
- scanner may safely be used in a multi-threaded environment. The
- API for a reentrant scanner is different than for a non-reentrant
- scanner *note Reentrant::). Because of the API difference between
- reentrant and non-reentrant `flex' scanners, non-reentrant flex
- code must be modified before it is suitable for use with this
- option. This option is not compatible with the `--c++' option.
- The option `--reentrant' does not affect the performance of the
- scanner.
复制代码
- 19 Reentrant C Scanners
- ***********************
- `flex' has the ability to generate a reentrant C scanner. This is
- accomplished by specifying `%option reentrant' (`-R') The generated
- scanner is both portable, and safe to use in one or more separate
- threads of control. The most common use for reentrant scanners is from
- within multi-threaded applications. Any thread may create and execute
- a reentrant `flex' scanner without the need for synchronization with
- other threads.
复制代码 |
|