Table of Contents

Interface IParser

Namespace
BOOSE
Assembly
BOOSE.dll

The Parser Class takes a BOOSE program as a String with each command seperated by '\n' and creates command objects for each valid command and stores them in the passed in StoredProgram. Exceptions are generated for any syntax errors. When each valid command is generated its Compile() method is called. The valid command will have its parameters processed and any variables identified. It is the role of StoredProgram to run the commands.

public interface IParser

Methods

ParseCommand(string)

Parse a single command. Takes a single line of a BOOSE program "-command- -parameterlist-" or "-variable- = -expression-" It seperates the command from the parameter list or the variable from the expression. An Object of the command is made. its parameter list/expression is set and its Compile() method is called.

ICommand ParseCommand(string Line)

Parameters

Line string

"-command- -parameterlist-" or "-variable- = -expression-"

Returns

ICommand

ICommand Object which can then be executed

ParseProgram(string)

Parse the entrire program, adding valid command objects to the StoredProgram. An errorlist string is generated containing any systax error messages.

void ParseProgram(string program)

Parameters

program string

big string of a complete program seperated by newlines