Expand description
Recursive-descent parser for the pic drawing core.
Follows dpic’s grammar.txt. Implemented: pictures (.PS … .PE), primitives
with the full attribute set, positions (pairs, places, corners, ordinals,
between, ± shifts), expressions with proper precedence, [ … ] blocks,
{ … } groups, labels, assignments, macros, includes, conditionals, loops,
print and exec.
Structs§
- Parse
Error - A parse error with source location.
Functions§
- parse
- Parse a full source string into a
Picturewith no filesystem context.copy "file"includes are unavailable (they require a base directory). - parse_
body_ tokens - Parse a deferred body (the raw tokens of an
if/forblock) with the macro table in scope, expanding macro calls (andcopyincludes) along this executed path. Used by the evaluator so dead branches and recursive macros are never parsed. - parse_
in_ dir - Parse pic source, resolving
copy "file"includes relative tobase.