Index

Package: Parsers

Description

package Expressions.Parsers is

Classes

Expression_Parser

type Expression_Parser is new Limited_Object with private;

Ancestors:

Primitive operations:

Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.To_String (Inherited)
An Expression_Parser parses an Expression from a token scanner. Given a token scanner loaded with an input stream, the expression parser will read tokens from the scanner and create a corresponding Expression tree.

Types

A_Expression_Parser

type A_Expression_Parser is access all Expression_Parser'Class;

Subprograms & Entries

Create_Expression_Parser

function Create_Expression_Parser return A_Expression_Parser;
Creates and returns a new Expression_Parser.

Expect_Expression

function Expect_Expression
( this: not null access Expression_Parser'Class;
scanner: not null A_Token_Scanner ) return A_Expression;
Scans an expression or raises Parse_Exception if one is not found. Parse_Exception will be raised if a parsing error occurs. Token_Exception will be raised if an unrecognized token is encountered by the scanner.

Scan_Expression

function Scan_Expression
( this: not null access Expression_Parser'Class;
scanner: not null A_Token_Scanner ) return A_Expression;
Scans an expression or returns null if one is not found. Parse_Exception will be raised if a parsing error occurs. Token_Exception will be raised if an unrecognized token is encountered by the scanner.

Delete

procedure Delete
( this: in out A_Expression_Parser );
Deletes the Expression_Parser.