file
Parser.hSystemVerilog language parser.
Contents
- Reference
Namespaces
- namespace slang
- Root namespace.
Classes
- struct slang::ParserOptions
- Contains various options that can control parsing behavior.
- class slang::Parser
- Implements a full syntax parser for SystemVerilog.
- struct slang::Parser::Metadata
- Various metadata collected during parsing.
- struct slang::Parser::Metadata::Node
- Collection of metadata that can be associated with a syntax node at parse time.
Enums
- enum class ExpressionOptions { None = 0, PatternContext = 1, ProceduralAssignmentContext = 2, EventExpressionContext = 4, ConstraintContext = 8, AllowSuperNewCall = 16 }
- Various options for parsing expressions.
- enum class NameOptions { None = 0, ForeachName = 1 << 0, IsFirst = 1 << 1, PreviousWasThis = 1 << 2, PreviousWasLocal = 1 << 3, ExpectingExpression = 1 << 4 }
- Various options for parsing names.
- enum class TypeOptions { None = 0, AllowImplicit = 1, AllowVoid = 2 }
- Various options for parsing types.
- enum class FunctionOptions { None = 0, AllowTasks = 1, AllowEmptyArgNames = 2, AllowImplicitReturn = 4, IsPrototype = 8 }
- Various options for parsing functions.
Enum documentation
enum class ExpressionOptions
Various options for parsing expressions.
Enumerators | |
---|---|
None |
No special options specified. |
PatternContext |
Inside a pattern expression we don't allow a nested pattern expression. |
ProceduralAssignmentContext |
In a procedural assignment context, <= is a non-blocking assignment, not the less than or equal to operator. |
EventExpressionContext |
In an event expression context, the "or" operator has special meaning. |
ConstraintContext |
In a constraint block context, the -> operator has special meaning. |
AllowSuperNewCall |
This expression is in a context where "super.new" calls are allowed. They are restricted to the first statement in a class constructor. |
enum class NameOptions
Various options for parsing names.
Enumerators | |
---|---|
None |
No special options specified. |
ForeachName |
Parsing the name of a foreach variable. |
IsFirst |
This is the first element of a potentially dotted name path. |
PreviousWasThis |
The previous element in the name path was the 'this' keyword. |
PreviousWasLocal |
The previous element in the name path was the 'local' keyword. |
ExpectingExpression |
We are expecting an expression while parsing this name. |
enum class TypeOptions
Various options for parsing types.
Enumerators | |
---|---|
None |
No special options specified. |
AllowImplicit |
Allow implicit types, e.g. just a signing or dimension list. |
AllowVoid |
Allow void types. |
enum class FunctionOptions
Various options for parsing functions.
Enumerators | |
---|---|
None |
No special options specified. |
AllowTasks |
Allow tasks (as opposed to just functions). |
AllowEmptyArgNames |
Allow formal argument names to be ommitted. |
AllowImplicitReturn |
Allow the return type to be ommitted. |
IsPrototype |
The function header is for a prototype, so parsing rules are slightly different. |