class
#include <slang/parsing/Parser.h>
Parser Implements a full syntax parser for SystemVerilog.
Public functions
-
syntax::
CompilationUnitSyntax& parseCompilationUnit() - Parse a whole compilation unit.
-
syntax::
LibraryMapSyntax& parseLibraryMap() - Parse a library map file.
-
syntax::
ExpressionSyntax& parseExpression() - Parse an expression / statement / module / class / name.
-
syntax::
SyntaxNode& parseGuess() - Generalized node parse function that tries to figure out what we're looking at and parse that specifically.
- bool isDone()
- Check whether the parser has consumed the entire input stream.
- ParserMetadata&& getMetadata()
- Gets the current set of metadata collected during parsing.
Function documentation
syntax:: ExpressionSyntax& slang:: parsing:: Parser:: parseExpression()
Parse an expression / statement / module / class / name.
These are mostly for testing; only use if you know that the source stream is currently looking at one of these.
syntax:: SyntaxNode& slang:: parsing:: Parser:: parseGuess()
Generalized node parse function that tries to figure out what we're looking at and parse that specifically.
A normal batch compile won't call this, since in a well formed program every file is a compilation unit, but for snippets of code this can be convenient.