Expand description
§Yaspar
Yaspar is a parsing library strictly following the SMTLib standard.
It is composed of two parts:
- A tokenizer, which can be found in crate::tokens::Tokenizer; given an iterator of chars, it tokenizes them into an iterator of SMTLib tokens;
- A number of parsers, in the form of callbacks; given an implementation of the corresponding trait, e.g. crate::action::ParsingAction, a parser in crate::smtlib2 parses an iteration of tokens, and callbacks the functions defined in the trait at appropriate timings, or errors out, if the tokens are grammatically mal-formed.
One example of how to use this crate is to see crate::action::UnitAction. This object trivially admits all parsing actions, so it accepts and only accepts grammatically well-formed SMT scripts.
Re-exports§
pub use crate::tokens::Tokenizer;
Modules§
- action
- ast
- The
astmodule contains the types that represent the values parsed from smt-lib. - position
- smtlib2
- tokens
- A Tokenizer for SMTLib
Structs§
Functions§
- binary_
to_ string - assume len >= the necessary number of bits to encode
bytes - hex_
to_ string - assume len >= the necessary number of hex codes to encode
bytes - is_
simple_ symbol - if s is a symbol, decide whether it is a simple symbol
- smt_
quoted_ symbol_ to_ string - converts a quoted symbol representation to a string
- smt_
string_ to_ string - converts an SMT string into a normal Rust string
- tokenize_
str - obtain a tokenizer from a string