Skip to content

yex.parse.RunLevel

yex.parse.RunLevel #

Bases: yex.parse.parser._CaselessEnum

Levels you can run a parser at.

DEEP = 10 class-attribute instance-attribute #

Direct access to the source beneath. For example, this will emit group delimiters rather than using them to start or end groups. This can only be used with next(), rather than with iterators, and you probably don't want to use it.

EXECUTING = 40 class-attribute instance-attribute #

Like EXPANDING, except that unexpandable controls and active tokens will be run rather than emitted. If the result is another such item, that will be run too, and so on. When the parser ends up with something else, it will emit that.

EXPANDING = 30 class-attribute instance-attribute #

Like READING, except that the parser will only return control tokens for unexpandable controls. It will run any expandable controls for you. For example, you won't see any of the symbols between \iffalse and \fi, and you won't see any user-defined macros.

QUERYING = 41 class-attribute instance-attribute #

Like EXECUTING, except that items with a value will be returned rather than executed. The item itself is returned, not its value.

READING = 20 class-attribute instance-attribute #

The parser will handle most kinds of token for you. But it will emit all control tokens, whether expandable or unexpandable, as well as all active tokens, and all LETTERs and OTHERs. This is the lowest level in common use.