Files
rxcc/one

134 lines
7.0 KiB
Plaintext

Tokens:
["int", "main", "(", ")", "{", "int", "tomas", ";", "tomas", "=", "2", ";", "return", "1", "+", "2", ";", "}"]
Begin validate subconstruct (type "Function")
Testing variant Integer (Loop = false) (Loopable = false)
Validated token "int"
Validated token "main"
Validated token "("
Validated token ")"
Validated token "{"
Begin validate subconstruct (type "StatementList")
Testing variant StatementSequence (Loop = false) (Loopable = false)
Determining need to loop construct of type Statement
Testing Statement::ReturnExpression
Failed to validate token "int". Expected "RETURN"
Testing Statement::DeclareVariable
Begin validate subconstruct (type "VariableDeclaration")
Testing variant Variable (Loop = false) (Loopable = false)
Validated token "int"
Validated token "tomas"
Determining need to continue. (TestingASSIGNMENT)
ASSIGNMENT NOT validated. Breaking
Success (variant "Variable")
End validate subconstruct (variant "Variable")
Validated token ";"
Looping
Determining need to loop construct of type Statement
Testing Statement::ReturnExpression
Failed to validate token "tomas". Expected "RETURN"
Testing Statement::DeclareVariable
Begin validate subconstruct (type "VariableDeclaration")
Testing variant Variable (Loop = false) (Loopable = false)
Failed to validate token "tomas". Expected "INT"
Fail: no valid variants (variant "Variable")
Subconstruct validation failed
Testing Statement::StandaloneExpression
Begin validate subconstruct (type "Expression")
Testing variant LogicalOrExpressionSequence (Loop = false) (Loopable = false)
Begin validate subconstruct (type "LogicalOrExpression")
Testing variant LogicalAndExpressionSequence (Loop = false) (Loopable = false)
Begin validate subconstruct (type "LogicalAndExpression")
Testing variant EqualityExpressionSequence (Loop = false) (Loopable = false)
Begin validate subconstruct (type "EqualityExpression")
Testing variant RelationalExpressionSequence (Loop = false) (Loopable = false)
Begin validate subconstruct (type "RelationalExpression")
Testing variant AdditiveExpressionSequence (Loop = false) (Loopable = false)
Begin validate subconstruct (type "AdditiveExpression")
Testing variant TermSequence (Loop = false) (Loopable = true)
Begin validate subconstruct (type "Term")
Testing variant FactorSequence (Loop = false) (Loopable = true)
Begin validate subconstruct (type "Factor")
Testing variant LiteralInteger (Loop = false) (Loopable = false)
Failed to validate token "tomas". Expected "LITERAL_INTEGER"
Fail: no valid variants (variant "LiteralInteger")
Testing variant StandaloneVariable (Loop = false) (Loopable = false)
Begin validate subconstruct (type "VariableFactor")
Testing variant Variable (Loop = false) (Loopable = false)
Validated token "tomas"
Success (variant "Variable")
End validate subconstruct (variant "Variable")
Success (variant "StandaloneVariable")
End validate subconstruct (variant "StandaloneVariable")
Determining need to loop construct of type MultiplicationPriorityOperator
Testing operator MultiplicationPriorityOperator::Division
Failed to validate token "=". Expected "DIVISION"
Testing operator MultiplicationPriorityOperator::Multiplication
Failed to validate token "=". Expected "MULTIPLICATION"
Not looping
Success (variant "FactorSequence")
End validate subconstruct (variant "FactorSequence")
Determining need to loop construct of type AdditionPriorityOperator
Testing operator AdditionPriorityOperator::Subtraction
Failed to validate token "=". Expected "NEGATION"
Testing operator AdditionPriorityOperator::Addition
Failed to validate token "=". Expected "ADDITION"
Not looping
Success (variant "TermSequence")
End validate subconstruct (variant "TermSequence")
Determining need to loop construct of type InequalityPriorityOperator
Testing operator InequalityPriorityOperator::GreaterThanOrEqualTo
Failed to validate token "=". Expected "GREATER_THAN_OR_EQUAL_TO"
Testing operator InequalityPriorityOperator::LessThan
Failed to validate token "=". Expected "LESS_THAN"
Testing operator InequalityPriorityOperator::LessThanOrEqualTo
Failed to validate token "=". Expected "LESS_THAN_OR_EQUAL_TO"
Testing operator InequalityPriorityOperator::GreaterThan
Failed to validate token "=". Expected "GREATER_THAN"
Not looping
Success (variant "AdditiveExpressionSequence")
End validate subconstruct (variant "AdditiveExpressionSequence")
Determining need to loop construct of type EqualityPriorityOperator
Testing operator EqualityPriorityOperator::EqualTo
Failed to validate token "=". Expected "EQUAL"
Testing operator EqualityPriorityOperator::NotEqualTo
Failed to validate token "=". Expected "NOT_EQUAL"
Not looping
Success (variant "RelationalExpressionSequence")
End validate subconstruct (variant "RelationalExpressionSequence")
Determining need to loop construct of type LogicalAndPriorityOperator
Testing operator LogicalAndPriorityOperator::LogicalAnd
Failed to validate token "=". Expected "LOGICAL_AND"
Not looping
Success (variant "EqualityExpressionSequence")
End validate subconstruct (variant "EqualityExpressionSequence")
Determining need to loop construct of type LogicalOrPriorityOperator
Testing operator LogicalOrPriorityOperator::LogicalOr
Failed to validate token "=". Expected "LOGICAL_OR"
Not looping
Success (variant "LogicalAndExpressionSequence")
End validate subconstruct (variant "LogicalAndExpressionSequence")
Success (variant "LogicalOrExpressionSequence")
End validate subconstruct (variant "LogicalOrExpressionSequence")
Failed to validate token "=". Expected "SEMICOLON"
Not looping
Success (variant "StatementSequence")
End validate subconstruct (variant "StatementSequence")
Failed to validate token "tomas". Expected "BRACE_CLOSE"
Fail: no valid variants (variant "Integer")
Subconstruct validation failed
Distinct lack of success