file
Parser.hSystemVerilog language parser.
Namespaces
- namespace slang
- Root namespace.
- namespace slang::parsing
- Lexing, preprocessing, and parsing functionality.
Classes
- struct slang::parsing::ParserOptions
- Contains various options that can control parsing behavior.
- class slang::parsing::Parser
- Implements a full syntax parser for SystemVerilog.
Enums
- enum class ExpressionOptions { None = 0, PatternContext = 1 << 0, ProceduralAssignmentContext = 1 << 1, ConstraintContext = 1 << 2, AllowSuperNewCall = 1 << 3, SequenceExpr = 1 << 4, DisallowVectors = 1 << 5, BinsSelectContext = 1 << 6, AllowDist = 1 << 7 }
- 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, SequenceExpr = 1 << 5, NoClassScope = 1 << 6 }
- Various options for parsing names.
- enum class TypeOptions { None = 0, AllowImplicit = 1, AllowVoid = 2 }
- Various options for parsing types.
- enum class FunctionOptions { None = 0, AllowEmptyArgNames = 1 << 0, AllowImplicitReturn = 1 << 1, IsPrototype = 1 << 2, AllowDefaultArg = 1 << 3, AllowOverrideSpecifiers = 1 << 4 }
- 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. |
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. |
SequenceExpr |
This expression is inside a sequence expression. |
DisallowVectors |
When parsing a primary expression, don't parse a full integer vector but instead just the first integer literal token. |
BinsSelectContext |
In a bins select context the && and || operators should be left to the bins parsing instead of being part of the expression itself. |
AllowDist |
"dist" expressions are allowed in this context. |
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. |
SequenceExpr |
This name is inside a sequence expression. |
NoClassScope |
This name does not allow class scope components. |
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. |
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. |
AllowDefaultArg |
Allow use of the 'default' argument. |
AllowOverrideSpecifiers |
Allow override specifiers to be declared on the function prototype. |