[previous] [up] [next]     [contents] [index]
Next: Attribute Up: Parser Previous: Parser

Environment

An environment maps identifiers in the input to information about their intended behavior in the program. For instance, some identifiers act as keywords that represent a micro or a macro, others are bound by a binding construct, and others are unbound.

McMicMac uses the type env-entry to range over representations of the possible types of behaviors an identifier can exhibit. env-entry includes:

macro-resolution (rewriter)

micro-resolution (rewriter)

top-level-resolution ()

The rewriter fields contain a micro or macro, as appropriate. Micros have the type read env attr vocab parsed while macros have the type read env read.

Languages implemented atop McMicMac will extend env-entry to reflect their binding constructs. Unless extended, all identifiers that do not resolve to macro or micros will yield top-level-resolutions.

tex2html_wrap_inline1697 extend-env
list (new-vars+marks) tex2html_wrap_inline1701 env tex2html_wrap_inline1699
tex2html_wrap_inline1697 retract-env
list (new-vars) tex2html_wrap_inline1701 env tex2html_wrap_inline1699
tex2html_wrap_inline1697 resolve
id tex2html_wrap_inline1701 env tex2html_wrap_inline1701 vocab tex2html_wrap_inline1699 env-entry

These procedures will be elaborated on later.



PLT