Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addChild(ParseTree) - Method in class ParseTree
-
Adds a child node to this node.
- ArgParser(String[]) - Constructor for class Main.ArgParser
-
Parses command line arguments.
- ASSIGN - Enum constant in enum class LexicalUnit
-
= - ASSIGN - Enum constant in enum class NonTerminal
-
Assignment production
C
- children - Variable in class ParseTree
-
The list of child nodes
- CODE - Enum constant in enum class NonTerminal
-
Code production
- column - Variable in exception ParseException
-
Column number where the error occurred
- column - Variable in class Symbol
-
The position of the symbol in the parsed file.
- COND_ATOM - Enum constant in enum class NonTerminal
-
Conditional atom production
- COND_COMP - Enum constant in enum class NonTerminal
-
Conditional comparison production
- COND_IMPL - Enum constant in enum class NonTerminal
-
Conditional implication production
- currentToken - Variable in class Parser
-
The current token being analyzed
D
- DIVIDE - Enum constant in enum class LexicalUnit
-
/ - DO - Enum constant in enum class LexicalUnit
-
Do - dummy(NonTerminal) - Method in class Parser
-
Creates a dummy symbol for non-terminal nodes in the parse tree.
E
- ELSE - Enum constant in enum class LexicalUnit
-
Else - END - Enum constant in enum class LexicalUnit
-
End - EOS - Enum constant in enum class LexicalUnit
-
End Of Stream
- EQUAL - Enum constant in enum class LexicalUnit
-
== - equals(Object) - Method in class Symbol
-
Compares this symbol to another object for equality.
- escapeLaTeX(String) - Static method in class Symbol
-
Escape LaTeX special characters in a string.
- expected - Variable in exception ParseException
-
The expected lexical unit
- EXPR_ADDSUB - Enum constant in enum class NonTerminal
-
Addition/Subtraction expression production
- EXPR_ARITH - Enum constant in enum class NonTerminal
-
Arithmetic expression production
- EXPR_MULDIV - Enum constant in enum class NonTerminal
-
Multiplication/Division expression production
- EXPR_PRIMARY - Enum constant in enum class NonTerminal
-
Primary expression production
- EXPR_UNARY - Enum constant in enum class NonTerminal
-
Unary expression production
F
- found - Variable in exception ParseException
-
The found lexical unit
G
- getChildren() - Method in class ParseTree
-
Returns the list of child nodes
- getColumn() - Method in exception ParseException
-
Returns the column number of the error.
- getColumn() - Method in class Symbol
-
Returns the column where the symbol appeared.
- getExpected() - Method in exception ParseException
-
Returns the expected lexical unit.
- getFound() - Method in exception ParseException
-
Returns the found lexical unit.
- getLabel() - Method in class ParseTree
-
Returns the label symbol
- getLine() - Method in exception ParseException
-
Returns the line number of the error.
- getLine() - Method in class Symbol
-
Returns the line where the symbol appeared.
- getRuleNumber() - Method in class ParseTree
-
Returns the rule number
- getType() - Method in class Symbol
-
Returns the type of the symbol.
- getValue() - Method in class Symbol
-
Returns the value of the symbol.
H
- hashCode() - Method in class Symbol
-
Returns a hash code value for the object.
I
- IF - Enum constant in enum class LexicalUnit
-
If - IF - Enum constant in enum class NonTerminal
-
If production
- IMPLIES - Enum constant in enum class LexicalUnit
-
-> - INPUT - Enum constant in enum class LexicalUnit
-
Input - INPUT - Enum constant in enum class NonTerminal
-
Input production
- inputFile - Variable in class Main.ArgParser
-
The input source file
- INSTRUCTION - Enum constant in enum class NonTerminal
-
Instruction production
- IS - Enum constant in enum class LexicalUnit
-
Is - isNonTerminal() - Method in class Symbol
-
Returns whether the symbol represents a non-terminal.
- isTerminal() - Method in class Symbol
-
Returns whether the symbol represents a terminal.
L
- label - Variable in class ParseTree
-
The label symbol for this node
- latexFile - Variable in class Main.ArgParser
-
The optional LaTeX output file
- LBRACK - Enum constant in enum class LexicalUnit
-
{ - lexer - Variable in class Parser
-
The lexical analyzer providing tokens for parsing.
- LexicalAnalyzer - Class in Unnamed Package
-
Scanner class, generated by JFlex.
- LexicalAnalyzer(Reader) - Constructor for class LexicalAnalyzer
-
Creates a new scanner
- LexicalUnit - Enum Class in Unnamed Package
-
A terminal symbol, a.k.a.
- LexicalUnit() - Constructor for enum class LexicalUnit
- line - Variable in exception ParseException
-
Line number where the error occurred
- line - Variable in class Symbol
-
The position of the symbol in the parsed file.
- LONGCOMMENTS - Static variable in class LexicalAnalyzer
- LPAREN - Enum constant in enum class LexicalUnit
-
(
M
- main(String[]) - Static method in class Main
-
Main method to run the parser.
- Main - Class in Unnamed Package
-
Main class to run the parser for YaLCC.
- Main() - Constructor for class Main
- Main.ArgParser - Class in Unnamed Package
-
Helper class to parse command line arguments.
- match(LexicalUnit) - Method in class Parser
-
Matches the current token against the expected token type.
- MINUS - Enum constant in enum class LexicalUnit
-
-
N
- NO_VALUE - Static variable in class Symbol
-
No value attached to symbol, for terminals without value.
- NonTerminal - Enum Class in Unnamed Package
-
Enumeration of non-terminal symbols used in the grammar.
- NonTerminal() - Constructor for enum class NonTerminal
- NUMBER - Enum constant in enum class LexicalUnit
-
[Number]
O
- OUTPUT - Enum constant in enum class NonTerminal
-
Output production
P
- parseAssign() - Method in class Parser
-
Parse assignment statement.
- parseCode() - Method in class Parser
-
Parse code block.
- parseCond() - Method in class Parser
-
Parse condition.
- parseCondAtom() - Method in class Parser
-
Parse condition atom.
- parseCondComp() - Method in class Parser
-
Parse condition comparison.
- parseCondImpl() - Method in class Parser
-
Parse condition with implication.
- ParseException - Exception in Unnamed Package
-
Exception thrown when a parsing error occurs.
- ParseException(String, int, int, LexicalUnit, LexicalUnit) - Constructor for exception ParseException
-
Constructs a ParseException with detailed information.
- parseExprAddSub() - Method in class Parser
-
Parse addition and subtraction.
- parseExprArith() - Method in class Parser
-
Parse arithmetic expression.
- parseExprMulDiv() - Method in class Parser
-
Parse multiplication and division.
- parseExprPrimary() - Method in class Parser
-
Parse primary expression.
- parseExprUnary() - Method in class Parser
-
Parse unary expression.
- parseFile(String) - Static method in class Main
-
Parses the input file and returns the parse tree.
- parseIf() - Method in class Parser
-
Parse If statement.
- parseInput() - Method in class Parser
-
Parse Input statement.
- parseInstruction() - Method in class Parser
-
Parse instruction statement.
- parseOptionalElse(ParseTree) - Method in class Parser
-
Handles the optional Else branch in an If statement.
- parseOutput() - Method in class Parser
-
Parse Output statement.
- parseProgram() - Method in class Parser
-
Parse the entire program.
- Parser - Class in Unnamed Package
-
Recursive descent parser for the YaLCC language.
- Parser(LexicalAnalyzer) - Constructor for class Parser
-
Creates a parser with the given lexical analyzer.
- ParseTree - Class in Unnamed Package
-
Represents a parse tree node for YaLCC.
- ParseTree(Symbol) - Constructor for class ParseTree
-
Creates a leaf node with a given symbol.
- ParseTree(Symbol, List<ParseTree>, int) - Constructor for class ParseTree
-
Creates a node with a symbol, a list of children and a rule number.
- parseWhile() - Method in class Parser
-
Parse While statement.
- PIPE - Enum constant in enum class LexicalUnit
-
| - PLUS - Enum constant in enum class LexicalUnit
-
+ - PRINT - Enum constant in enum class LexicalUnit
-
Print - printRuleNumbers(ParseTree) - Static method in class Main
-
Recursively prints the rule numbers in leftmost derivation order.
- PROG - Enum constant in enum class LexicalUnit
-
Prog - PROGNAME - Enum constant in enum class LexicalUnit
-
[ProgName]
- PROGRAM - Enum constant in enum class NonTerminal
-
Program production
R
- RBRACK - Enum constant in enum class LexicalUnit
-
} - RPAREN - Enum constant in enum class LexicalUnit
-
) - ruleNumber - Variable in class ParseTree
-
The rule number used to create this node
S
- SEMI - Enum constant in enum class LexicalUnit
-
; - setRuleNumber(int) - Method in class ParseTree
-
Sets the rule number
- SMALEQ - Enum constant in enum class LexicalUnit
-
<= - SMALLER - Enum constant in enum class LexicalUnit
-
< - symbol(LexicalUnit) - Method in class LexicalAnalyzer
-
Builds a
Symbolwith the given lexical unit, using the current position in the source (line and column) and the matched text (yytext()) as its value. - symbol(LexicalUnit, Object) - Method in class LexicalAnalyzer
-
Builds a
Symbolwith the given lexical unit and a specific value, using the current position in the source (line and column). - Symbol - Class in Unnamed Package
-
Symbol objects represent a terminal or non-terminal symbol in the grammar.
- Symbol(LexicalUnit) - Constructor for class Symbol
-
Creates a Symbol using the provided attributes, without position or value.
- Symbol(LexicalUnit, int) - Constructor for class Symbol
-
Creates a Symbol using the provided attributes, without column nor value.
- Symbol(LexicalUnit, int, int) - Constructor for class Symbol
-
Creates a Symbol using the provided attributes and no value.
- Symbol(LexicalUnit, int, int, Object) - Constructor for class Symbol
-
Creates a Symbol using the provided attributes.
- Symbol(LexicalUnit, Object) - Constructor for class Symbol
-
Creates a Symbol using the provided attributes, without position.
T
- THEN - Enum constant in enum class LexicalUnit
-
The - TIMES - Enum constant in enum class LexicalUnit
-
* - toForestPicture() - Method in class ParseTree
-
Writes the tree as a forest picture.
- toLaTeX() - Method in class ParseTree
-
Writes the tree as a LaTeX document which can be compiled using PDFLaTeX.
- toLaTexTree() - Method in class ParseTree
-
Writes the tree in LaTeX forest format.
- toString() - Method in class Symbol
-
Returns a string representation of the symbol.
- toTexString() - Method in class Symbol
-
Returns a LaTeX-formatted string representation of the symbol.
- toTikZ() - Method in class ParseTree
-
Writes the tree as TikZ code.
- toTikZPicture() - Method in class ParseTree
-
Writes the tree as a TikZ picture.
- type - Variable in class Symbol
-
The LexicalUnit (terminal) attached to this token.
U
- UNARY_MINUS - Enum constant in enum class NonTerminal
-
Unary minus operation
- UNDEFINED_POSITION - Static variable in class Symbol
-
Undefined line/column position of symbol.
V
- value - Variable in class Symbol
-
The value attached to the token.
- valueOf(String) - Static method in enum class LexicalUnit
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class NonTerminal
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class LexicalUnit
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class NonTerminal
-
Returns an array containing the constants of this enum class, in the order they are declared.
- VARNAME - Enum constant in enum class LexicalUnit
-
[VarName]
W
- WHILE - Enum constant in enum class LexicalUnit
-
While - WHILE - Enum constant in enum class NonTerminal
-
While production
- writeLaTeXToFile(ParseTree, String) - Static method in class Main
-
Writes the LaTeX representation of the parse tree to a file.
Y
- yybegin(int) - Method in class LexicalAnalyzer
-
Enters a new lexical state
- yychar - Variable in class LexicalAnalyzer
-
the number of characters up to the start of the matched text
- yycharat(int) - Method in class LexicalAnalyzer
-
Returns the character at position pos from the matched text.
- yyclose() - Method in class LexicalAnalyzer
-
Closes the input stream.
- yycolumn - Variable in class LexicalAnalyzer
-
the number of characters from the last newline up to the start of the matched text
- YYEOF - Static variable in class LexicalAnalyzer
-
This character denotes the end of file
- YYINITIAL - Static variable in class LexicalAnalyzer
-
lexical states
- yylength() - Method in class LexicalAnalyzer
-
Returns the length of the matched text region.
- yylex() - Method in class LexicalAnalyzer
-
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
- yyline - Variable in class LexicalAnalyzer
-
number of newlines encountered up to the start of the matched text
- yypushback(int) - Method in class LexicalAnalyzer
-
Pushes the specified amount of characters back into the input stream.
- yyreset(Reader) - Method in class LexicalAnalyzer
-
Resets the scanner to read from a new input stream.
- yystate() - Method in class LexicalAnalyzer
-
Returns the current lexical state.
- yytext() - Method in class LexicalAnalyzer
-
Returns the text matched by the current regular expression.
Z
- ZZ_ACTION - Static variable in class LexicalAnalyzer
-
Translates DFA states to action switch labels.
- ZZ_ACTION_PACKED_0 - Static variable in class LexicalAnalyzer
- ZZ_ATTRIBUTE - Static variable in class LexicalAnalyzer
-
ZZ_ATTRIBUTE[aState] contains the attributes of state
aState - ZZ_ATTRIBUTE_PACKED_0 - Static variable in class LexicalAnalyzer
- ZZ_BUFFERSIZE - Static variable in class LexicalAnalyzer
-
initial size of the lookahead buffer
- ZZ_CMAP - Static variable in class LexicalAnalyzer
-
Translates characters to character classes
- ZZ_CMAP_PACKED - Static variable in class LexicalAnalyzer
-
Translates characters to character classes
- ZZ_ERROR_MSG - Static variable in class LexicalAnalyzer
- ZZ_LEXSTATE - Static variable in class LexicalAnalyzer
-
ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the beginning of a line l is of the form l = 2*k, k a non negative integer
- ZZ_NO_MATCH - Static variable in class LexicalAnalyzer
- ZZ_PUSHBACK_2BIG - Static variable in class LexicalAnalyzer
- ZZ_ROWMAP - Static variable in class LexicalAnalyzer
-
Translates a state to a row index in the transition table
- ZZ_ROWMAP_PACKED_0 - Static variable in class LexicalAnalyzer
- ZZ_TRANS - Static variable in class LexicalAnalyzer
-
The transition table of the DFA
- ZZ_TRANS_PACKED_0 - Static variable in class LexicalAnalyzer
- ZZ_UNKNOWN_ERROR - Static variable in class LexicalAnalyzer
- zzAtBOL - Variable in class LexicalAnalyzer
-
zzAtBOL == true iff the scanner is currently at the beginning of a line
- zzAtEOF - Variable in class LexicalAnalyzer
-
zzAtEOF == true iff the scanner is at the EOF
- zzBuffer - Variable in class LexicalAnalyzer
-
this buffer contains the current text to be matched and is the source of the yytext() string
- zzCurrentPos - Variable in class LexicalAnalyzer
-
the current text position in the buffer
- zzEndRead - Variable in class LexicalAnalyzer
-
endRead marks the last character in the buffer, that has been read from input
- zzEOFDone - Variable in class LexicalAnalyzer
-
denotes if the user-EOF-code has already been executed
- zzFinalHighSurrogate - Variable in class LexicalAnalyzer
-
The number of occupied positions in zzBuffer beyond zzEndRead.
- zzLexicalState - Variable in class LexicalAnalyzer
-
the current lexical state
- zzMarkedPos - Variable in class LexicalAnalyzer
-
the textposition at the last accepting state
- zzReader - Variable in class LexicalAnalyzer
-
the input device
- zzRefill() - Method in class LexicalAnalyzer
-
Refills the input buffer.
- zzScanError(int) - Method in class LexicalAnalyzer
-
Reports an error that occured while scanning.
- zzStartRead - Variable in class LexicalAnalyzer
-
startRead marks the beginning of the yytext() string in the buffer
- zzState - Variable in class LexicalAnalyzer
-
the current state of the DFA
- zzUnpackAction() - Static method in class LexicalAnalyzer
- zzUnpackAction(String, int, int[]) - Static method in class LexicalAnalyzer
- zzUnpackAttribute() - Static method in class LexicalAnalyzer
- zzUnpackAttribute(String, int, int[]) - Static method in class LexicalAnalyzer
- zzUnpackCMap(String) - Static method in class LexicalAnalyzer
-
Unpacks the compressed character translation table.
- zzUnpackRowMap() - Static method in class LexicalAnalyzer
- zzUnpackRowMap(String, int, int[]) - Static method in class LexicalAnalyzer
- zzUnpackTrans() - Static method in class LexicalAnalyzer
- zzUnpackTrans(String, int, int[]) - Static method in class LexicalAnalyzer
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form