About
zypo-parser
is the primary parser implementation for the zypo-rs
reference compiler. This package uses the LALRPOP
library, a yacc-like LR(1)
parser combiner for Rust. This crate also
contains the AST (abstract-syntax-tree) for Zypo and all public AST structures,
enums and associated functions are avalible at the base-level of this crate.
Please beware as this package is heavily work-in-progress and is developed
alongside the main Zypo compiler as a sub-package. If you are looking for
the base zypo-rs
compiler, you may find it
here.
Examples
Shortcut for parsing an AST or panicing if there is an error in any of the given input:
use ; // All but ast_result are from the AST. ast_result is the shortcut func
More controllable but lower-level LALRPOP
bind for manually handling the
generated parsing errors:
use ; // Function and VarType are from the AST, parser is generated by LALRPOP