Libraries.Language.Compile.Parsing.QuorumParser Documentation
This class defines the parser for the Quorum programming language. Individual actions make their own assumptions about where in the token stream they are. For example, while the Start action assumes a full Quorum program, Expression assumes we are parsing only an expression. This provides us considerable flexibility in how we manage and parse programs in Quorum.
Inherits from: Libraries.Language.Object
Actions Documentation
ActionCall()
ActionDeclaration()
Process just the declaration of an action, including its block if it has one.
Return
ActionExpressionList()
Processes an expression list inside of another Expression
Return
Libraries.Language.Compile.Context.ActionExpressionListContext:
ActionOrParentActionCall()
Processes an action call that is either a normal or a parent one
Return
ActionShared()
This processes the header of an action declaration.
Return
Addition()
AlertStatement()
AlwaysStatement()
And()
AssignmentDeclaration()
Process one statement assumed to be an assignment statement.
Return
Libraries.Language.Compile.Context.AssignmentDeclaractionContext:
AssignmentStatement()
This processes a generic assignment statement of any legal kind.
Return
AssignmentStatementInFieldBlock()
Block()
Boolean()
Cast()
CheckStatement()
Class()
ClassStatement()
Process one statement issued inside of a class, either an action declaration or an assignment statement.
Return
ClassType()
Processes and class type value, which is just a qualified name
Return
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
DetectStatement()
Equals()
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
Expression()
FormalParameter()
FullClass()
Parse a class definition that is explicit, meaning that the user typed class, a name, etc.
Return
Libraries.Language.Compile.Context.FullClassDeclarationContext:
GenericDeclaration()
GenericStatement()
GetCompilerErrorManager()
Returns the compiler error manager used in this parser.
Return
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetLexer()
Greater()
HasNext()
This action returns that the stream is valid if there are no errors in the error manager and if the current token is a valid token. An error manager must be defined, otherwise the parser cannot track its issues and therefore always throws an error.
Return
boolean:
IfStatement()
IneritanceDeclaration()
InheritanceStatement()
Process an individual statement related to inheritance.
Return
Inherits()
Input()
Integer()
IsOutputMisspelling(Libraries.Language.Compile.Parsing.Token token)
This action determines if the token is likely to be a misspelling of the word output.
Parameters
Return
boolean:
IsSayMisspelling(Libraries.Language.Compile.Parsing.Token token)
This action determines if the token is likely to be a misspelling of the word say.
Parameters
Return
boolean:
IsValid()
This action returns that the stream is valid if there are no errors in the error manager and if the current token is a valid token. An error manager must be defined, otherwise the parser cannot track its issues and therefore always throws an error.
Return
boolean:
Literal()
Me()
Multiplication()
NoClass()
This action processes an implicit class statement, where the user did not write out a class and classname.
Return
Libraries.Language.Compile.Context.NoClassDeclarationContext:
NoTypeAssignment()
Process an assignment statement if no type is provided.
Return
NormalAssignment()
Processes a full assignment statement. modifier = access_modifier? CONSTANT? type = assignment_declaration name = ID (EQUALITY rhs = expression)? #NormalAssignment
Return
Number()
ObjectAssignment()
Process an assignment statement if no type is provided. object=ID (COLON PARENT COLON parent=qualified_name)? COLON name = ID EQUALITY rhs = expression #ObjectAssignment
Return
Or()
OutputStatement()
Package()
ParentAssignment()
Process an assignment statement if we are assigning to a parent.
Return
ParentVariableActionCall()
Processes an action call from a parent Expression
Return
Libraries.Language.Compile.Context.ParentVariableFunctionCallContext:
ParentVariableSoloActionCall()
An action call involving a parent.
Return
Libraries.Language.Compile.Context.ParentVariableFunctionCallContext:
Parenthesis()
QualifiedName()
RepeatStatement()
ReturnStatement()
SayStatement()
SetCompilerErrorManager(Libraries.Language.Compile.CompilerErrorManager compilerErrorManager)
Sets the compiler error manager used in this parser.
Parameters
SetLexer(Libraries.Language.Compile.Parsing.QuorumLexer lexer)
Start()
This action obtains a parse from a token stream assuming a complete Quorum program. A valid lexer must have been sent to the parser before calling this action.
Return
Statement()
Text()
UnaryOperator()
Undefined()
Use()
Uses()
VariableFunctionCall()
Processes an action call, from a variable, Expression
Return
Libraries.Language.Compile.Context.VariableFunctionCallContext:
VariableSoloActionCall()
Statement of an action call on a line.
Return
Libraries.Language.Compile.Context.VariableFunctionCallContext:
On this page
Variables TableAction Documentation- ActionCall()
- ActionDeclaration()
- ActionExpressionList()
- ActionOrParentActionCall()
- ActionShared()
- Addition()
- AlertStatement()
- AlwaysStatement()
- And()
- AssignmentDeclaration()
- AssignmentStatement()
- AssignmentStatementInFieldBlock()
- Block()
- Boolean()
- Cast()
- CheckStatement()
- Class()
- ClassStatement()
- ClassType()
- Compare(Libraries.Language.Object object)
- DetectStatement()
- Equals()
- Equals(Libraries.Language.Object object)
- Expression()
- FormalParameter()
- FullClass()
- GenericDeclaration()
- GenericStatement()
- GetCompilerErrorManager()
- GetHashCode()
- GetLexer()
- Greater()
- HasNext()
- IfStatement()
- IneritanceDeclaration()
- InheritanceStatement()
- Inherits()
- Input()
- Integer()
- IsOutputMisspelling(Libraries.Language.Compile.Parsing.Token token)
- IsSayMisspelling(Libraries.Language.Compile.Parsing.Token token)
- IsValid()
- Literal()
- Me()
- Multiplication()
- NoClass()
- NoTypeAssignment()
- NormalAssignment()
- Number()
- ObjectAssignment()
- Or()
- OutputStatement()
- Package()
- ParentAssignment()
- ParentVariableActionCall()
- ParentVariableSoloActionCall()
- Parenthesis()
- QualifiedName()
- RepeatStatement()
- ReturnStatement()
- SayStatement()
- SetCompilerErrorManager(Libraries.Language.Compile.CompilerErrorManager compilerErrorManager)
- SetLexer(Libraries.Language.Compile.Parsing.QuorumLexer lexer)
- Start()
- Statement()
- Text()
- UnaryOperator()
- Undefined()
- Use()
- Uses()
- VariableFunctionCall()
- VariableSoloActionCall()