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 Quoru
Inherits from: Libraries.Language.Object
Summary
Actions Summary Table
Actions | Description |
---|---|
ActionCall() | Processes an action call Expressi |
ActionDeclaration() | Process just the declaration of an action, including its block if it has on |
ActionExpressionList() | Processes an expression list inside of another Expressi |
ActionOrParentActionCall() | Processes an action call that is either a normal or a parent o |
ActionShared() | This processes the header of an action declaratio |
Addition() | Processes a +/- Expressi |
AlertStatement() | This processes an alert statemen |
AlwaysStatement() | This processes a always statemen |
And() | Processes and And Expressi |
AssignmentDeclaration() | Process one statement assumed to be an assignment statemen |
AssignmentStatement() | This processes a generic assignment statement of any legal kin |
Block() | Process a bloc |
Boolean() | Processes a boolean Expressi |
Cast() | Processes a cast Expressi |
CheckStatement() | This processes a check statemen |
Class() | This action parses a class definitio |
ClassStatement() | Process one statement issued inside of a class, either an action declaration or an assignment statemen |
ClassType() | Processes and class type value, which is just a qualified na |
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
DetectStatement() | This processes a detect statemen |
Equals() | Processes and = or not= Expressi |
Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |
Expression() | Process an expressio |
FormalParameter() | This processes a single paramete |
FullClass() | Parse a class definition that is explicit, meaning that the user typed class, a name, et |
GenericDeclaration() | This processes generic |
GenericStatement() | Process a single generic statemen |
GetCompilerErrorManager() | Returns the compiler error manager used in this parse |
GetHashCode() | This action gets the hash code for an object. |
GetLexer() | |
Greater() | Processes a > Expressi |
IfStatement() | This processes a if statemen |
IneritanceDeclaration() | Process inheritan |
InheritanceStatement() | Process an individual statement related to inheritanc |
Inherits() | Processes an is expressi |
Input() | Processes an input Expressi |
Integer() | Processes an integer Expressi |
IsOutputMisspelling(Libraries.Language.Compile.Parsing.Token token) | This action determines if the token is likely to be a misspelling of the word outpu |
IsSayMisspelling(Libraries.Language.Compile.Parsing.Token token) | This action determines if the token is likely to be a misspelling of the word sa |
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. |
Literal() | Processes an literal Expressi |
Me() | Processes the me variable Expressi |
Multiplication() | Processes a * or / Expressi |
NoClass() | This action processes an implicit class statement, where the user did not write out a class and classnam |
NoTypeAssignment() | Process an assignment statement if no type is provide |
NormalAssignment() | Processes a full assignment statement. |
Number() | Processes a number Expressi |
ObjectAssignment() | Process an assignment statement if no type is provided. |
Or() | Process an expressio |
OutputStatement() | This processes a output statemen |
Package() | Process one package statemen |
ParentAssignment() | Process an assignment statement if we are assigning to a paren |
ParentVariableActionCall() | Processes an action call from a parent Expressi |
ParentVariableSoloActionCall() | An action call involving a paren |
Parenthesis() | Processes a paren () Expressi |
QualifiedName() | Process a qualified nam |
RepeatStatement() | This processes just a repeat statemen |
ReturnStatement() | This processes only a return statemen |
SayStatement() | This processes a say statemen |
SetCompilerErrorManager(Libraries.Language.Compile.CompilerErrorManager compilerErrorManager) | Sets the compiler error manager used in this parse |
SetLexer(Libraries.Language.Compile.Parsing.QuorumLexer lexer) | |
Start() | This action obtains a parse from a token stream assuming a complete Quorum program. |
Statement() | Process a single generic statemen |
Text() | Processes a text Expressi |
UnaryOperator() | Processes a unary operator Expressi |
Undefined() | Processes a text Expressi |
Use() | Process one use stateme |
Uses() | Processes all use statements and places them in an arra |
VariableFunctionCall() | Processes an action call, from a variable, Expressi |
VariableSoloActionCall() | Statement of an action call on a lin |
Actions Documentation
ActionCall()
Processes an action call Expressi
Return
Libraries.Language.Compile.Context.ActionCallContext:
ActionDeclaration()
Process just the declaration of an action, including its block if it has on
Return
Libraries.Language.Compile.Context.ParseContext:
ActionExpressionList()
Processes an expression list inside of another Expressi
Return
Libraries.Language.Compile.Context.ActionExpressionListContext:
ActionOrParentActionCall()
Processes an action call that is either a normal or a parent o
Return
Libraries.Language.Compile.Context.ParseContext:
ActionShared()
This processes the header of an action declaratio
Return
Libraries.Language.Compile.Context.ActionContext:
Addition()
Processes a +/- Expressi
Return
Libraries.Language.Compile.Context.ParseContext:
AlertStatement()
This processes an alert statemen
Return
Libraries.Language.Compile.Context.AlertContext:
AlwaysStatement()
This processes a always statemen
Return
Libraries.Language.Compile.Context.AlwaysStatementContext:
And()
Processes and And Expressi
Return
Libraries.Language.Compile.Context.ParseContext:
AssignmentDeclaration()
Process one statement assumed to be an assignment statemen
Return
Libraries.Language.Compile.Context.AssignmentDeclaractionContext:
AssignmentStatement()
This processes a generic assignment statement of any legal kin
Return
Libraries.Language.Compile.Context.ParseContext:
Block()
Process a bloc
Return
Libraries.Language.Compile.Context.BlockContext:
Boolean()
Processes a boolean Expressi
Return
Libraries.Language.Compile.Context.BooleanContext:
Cast()
Processes a cast Expressi
Return
Libraries.Language.Compile.Context.CastContext:
CheckStatement()
This processes a check statemen
Return
Libraries.Language.Compile.Context.CheckContext:
Class()
This action parses a class definitio
Return
Libraries.Language.Compile.Context.ParseContext:
ClassStatement()
Process one statement issued inside of a class, either an action declaration or an assignment statemen
Return
Libraries.Language.Compile.Context.ClassStatementsContext:
ClassType()
Processes and class type value, which is just a qualified na
Return
Libraries.Language.Compile.Context.ClassTypeContext:
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.
Example Code
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
DetectStatement()
This processes a detect statemen
Return
Libraries.Language.Compile.Context.DetectStatementContext:
Equals()
Processes and = or not= Expressi
Return
Libraries.Language.Compile.Context.ParseContext:
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Example Code
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Expression()
Process an expressio
Return
Libraries.Language.Compile.Context.ParseContext:
FormalParameter()
This processes a single paramete
Return
Libraries.Language.Compile.Context.FormalParameterContext:
FullClass()
Parse a class definition that is explicit, meaning that the user typed class, a name, et
Return
Libraries.Language.Compile.Context.FullClassDeclarationContext:
GenericDeclaration()
This processes generic
Return
Libraries.Language.Compile.Context.GenericDeclarationContext:
GenericStatement()
Process a single generic statemen
Return
Libraries.Language.Compile.Context.GenericContext:
GetCompilerErrorManager()
Returns the compiler error manager used in this parse
Return
Libraries.Language.Compile.CompilerErrorManager:
GetHashCode()
This action gets the hash code for an object.
Example Code
Object o
integer hash = o:GetHashCode
Return
integer: The integer hash code of the object.
GetLexer()
Return
Libraries.Language.Compile.Parsing.QuorumLexer
Greater()
Processes a > Expressi
Return
Libraries.Language.Compile.Context.ParseContext:
IfStatement()
This processes a if statemen
Return
Libraries.Language.Compile.Context.IfContext:
IneritanceDeclaration()
Process inheritan
Return
Libraries.Language.Compile.Context.InheritStatementsContext:
InheritanceStatement()
Process an individual statement related to inheritanc
Return
Libraries.Language.Compile.Context.InheritStatementContext:
Inherits()
Processes an is expressi
Return
Libraries.Language.Compile.Context.ParseContext:
Input()
Processes an input Expressi
Return
Libraries.Language.Compile.Context.InputContext:
Integer()
Processes an integer Expressi
Return
Libraries.Language.Compile.Context.IntegerContext:
IsOutputMisspelling(Libraries.Language.Compile.Parsing.Token token)
This action determines if the token is likely to be a misspelling of the word outpu
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 sa
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 erro
Return
boolean:
Literal()
Processes an literal Expressi
Return
Libraries.Language.Compile.Context.ParseContext:
Me()
Processes the me variable Expressi
Return
Libraries.Language.Compile.Context.MeContext:
Multiplication()
Processes a * or / Expressi
Return
Libraries.Language.Compile.Context.ParseContext:
NoClass()
This action processes an implicit class statement, where the user did not write out a class and classnam
Return
Libraries.Language.Compile.Context.NoClassDeclarationContext:
NoTypeAssignment()
Process an assignment statement if no type is provide
Return
Libraries.Language.Compile.Context.NoTypeAssignmentContext:
NormalAssignment()
Processes a full assignment statement. modifier = access_modifier? CONSTANT? type = assignment_declaration name = ID (EQUALITY rhs = expression)? #NormalAssignme
Return
Libraries.Language.Compile.Context.NormalAssignmentContext:
Number()
Processes a number Expressi
Return
Libraries.Language.Compile.Context.NumberContext:
ObjectAssignment()
Process an assignment statement if no type is provided. object=ID (COLON PARENT COLON parent=qualified_name)? COLON name = ID EQUALITY rhs = expression #ObjectAssignme
Return
Libraries.Language.Compile.Context.ObjectAssignmentContext:
Or()
Process an expressio
Return
Libraries.Language.Compile.Context.ParseContext:
OutputStatement()
This processes a output statemen
Return
Libraries.Language.Compile.Context.OutputContext:
Package()
Process one package statemen
Return
Libraries.Language.Compile.Context.PackageContext:
ParentAssignment()
Process an assignment statement if we are assigning to a paren
Return
Libraries.Language.Compile.Context.ParentAssignmentContext:
ParentVariableActionCall()
Processes an action call from a parent Expressi
Return
Libraries.Language.Compile.Context.ParentVariableFunctionCallContext:
ParentVariableSoloActionCall()
An action call involving a paren
Return
Libraries.Language.Compile.Context.ParentVariableFunctionCallContext:
Parenthesis()
Processes a paren () Expressi
Return
Libraries.Language.Compile.Context.ParenthesisContext:
QualifiedName()
Process a qualified nam
Return
Libraries.Language.Compile.Context.QualifiedNameContext:
RepeatStatement()
This processes just a repeat statemen
Return
Libraries.Language.Compile.Context.LoopContext:
ReturnStatement()
This processes only a return statemen
Return
Libraries.Language.Compile.Context.ReturnContext:
SayStatement()
This processes a say statemen
Return
Libraries.Language.Compile.Context.SayContext:
SetCompilerErrorManager(Libraries.Language.Compile.CompilerErrorManager compilerErrorManager)
Sets the compiler error manager used in this parse
Parameters
SetLexer(Libraries.Language.Compile.Parsing.QuorumLexer lexer)
Parameters
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 actio
Return
Libraries.Language.Compile.Context.StartContext:
Statement()
Process a single generic statemen
Return
Libraries.Language.Compile.Context.StatementContext:
Text()
Processes a text Expressi
Return
Libraries.Language.Compile.Context.TextContext:
UnaryOperator()
Processes a unary operator Expressi
Return
Libraries.Language.Compile.Context.ParseContext:
Undefined()
Processes a text Expressi
Return
Libraries.Language.Compile.Context.UndefinedContext:
Use()
Process one use stateme
Return
Libraries.Language.Compile.Context.UseContext:
Uses()
Processes all use statements and places them in an arra
Return
VariableFunctionCall()
Processes an action call, from a variable, Expressi
Return
Libraries.Language.Compile.Context.VariableFunctionCallContext:
VariableSoloActionCall()
Statement of an action call on a lin
Return
Libraries.Language.Compile.Context.VariableFunctionCallContext: