slang/parsing/Parser.h file

SystemVerilog language parser.

Contents

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::NodeMetadata
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, IsFirst = 2, PreviousWasThis = 4, ExpectingExpression = 8 }
Various options for parsing names.
enum class TypeOptions { None = 0, AllowImplicit = 1, AllowVoid = 2 }
Various options for parsing types.

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.

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.