Show / Hide Table of Contents

Namespace VM.Parser

Classes

AssignIndexStmt

Statement representing assignment to an array element by index.

AstNode

Base class for all AST nodes. Stores line number and provides an accept method for the visitor pattern.

BinaryExpr

Expression representing a binary operation (e.g., a + b).

ContinueStmt

Statement that causes loop control to jump to the next iteration.

CustomCallExpr

Expression representing a custom user-defined function call.

ExitStmt

Statement that causes an immediate exit from the current loop or program.

ExprNode

Base class for all expressions (i.e., values, operators, function calls).

ForStmt

Statement representing a FOR loop with optional STEP.

FuncCallExpr

Expression representing a built-in function call.

IfStmt

Statement representing a conditional IF block with optional ELSE branch.

IndexExpr

Expression representing an index access on an array (e.g., a[5]).

InputStmt

Statement for accepting input into one or more variables.

LetStmt

Statement representing a LET assignment to a variable.

NewArrayExpr

Expression representing array creation using ARRAY(n) syntax.

NumberExpr

Expression representing a numeric literal.

ParseException

Exception thrown when a syntax error occurs during parsing

PrintStmt

Statement representing a PRINT operation, which outputs expressions to the console.

ProgramNode

Root node of the AST representing the entire program. Contains a sequence of top-level statements.

ProgramParser

Handwritten top-down LL(1) parser with operator precedence support for a BASIC-like language.

RepeatStmt

Statement representing a REPEAT-UNTIL loop.

StatementNode

Base class for all statements (i.e., code that performs actions).

StringExpr

Expression representing a string literal.

Token

Represents a single token from the source code, with type, raw text, and line number.

TokenUtils

Provides utility methods for working with tokens.

Tokenizer

Converts raw source code into a stream of tokens. Line-based, BASIC-style tokenizer.

UnaryExpr

Expression representing a unary operation (e.g., -a or NOT a).

VarExpr

Expression representing a reference to a variable.

WhileStmt

Statement representing a WHILE loop.

Interfaces

IAstVisitor<T>

Defines a visitor interface for traversing AST nodes. Used to separate processing logic from the AST structure itself (Visitor pattern).

Enums

TokenType

Enumeration of all possible token types recognized by the tokenizer. Includes keywords, symbols, identifiers, literals, and special markers.

In this article
Back to top Generated by DocFX