Expand description
Python bindings for the scarf SystemVerilog tools
When crossing the FFI boundary, Rust’s borrow checker can no longer
provide lifetime guarantees; as such, many data structures must be
cloned, and have associated From/Into implementations for
their reference-based Rust counterparts. This quickly becomes the
dominant factor in runtime; if speed/space usage becomes a concern,
native Rust applications should be considered instead.
Modules§
- scarf_
python - The top-level Python module
Structs§
- Bytes
- A wrapper around
std::ops::Range<usize> - Define
- A wrapper around
scarf_parser::preprocessor::Define - Node
- A wrapper around
scarf_syntax::Node, providing a single CST node - Node
Iterator - An iterator over
Nodes - Report
- A wrapper around
scarf_parser::report::Report - Span
- A wrapper around
scarf_syntax::Span, providing a location in the source code where aNodewas found - Spanned
Token - A source file
Tokenwith an associatedSpan - Verbose
Error - A wrapper around
scarf_parser::VerboseError
Enums§
- Expectation
- An expectation instead of what was found
- Parser
Result - The result of parsing a SystemVerilog source
- Preprocessor
Error - A wrapper around
scarf_parser::PreprocessorError - Preprocessor
Result - The result of preprocessing a SystemVerilog source
- Report
Kind - The type of report being generated, used for coloring output
- Token
- A wrapper around
scarf_parser::Token
Functions§
- define_
empty - Create a
Definefor a name with no replacement text - define_
text - Create a
Definefor a name with some replacement text - lex
- Separate a source file into syntactic tokens
- parse
- Parse the token stream into a concrete syntax tree
- parse_
from_ preprocess - Same as
parse, but operates on the output ofpreprocess - preprocess
- Preprocess a token stream, elaborating compiler directives
- preprocess_
from_ lex - Same as
preprocess, but operates on the output oflex