A B C D E F G I L N O P R S T U V W

A

AbstractSyntaxNode - Interface in edu.cornell.cs.cs4120.xi
Abstract syntax tree node for representing a Xi program.
allowBreak(int, int, String, int) - Method in class polyglot.util.CodeWriter
Insert a break (an optional newline).
allowBreak(int) - Method in class polyglot.util.CodeWriter
The most common use of "allowBreak": level 1, with an alternative of a single space.
allowBreak(int, String) - Method in class polyglot.util.CodeWriter
 
allowBreak(int, int, String, int) - Method in class polyglot.util.OptimalCodeWriter
 
allowBreak(int, int, String, int) - Method in class polyglot.util.SimpleCodeWriter
 

B

begin(int) - Method in class polyglot.util.CodeWriter
Start a new block with a relative indentation of n characters.
begin(int) - Method in class polyglot.util.OptimalCodeWriter
Start a new block with a relative indentation of n characters.
begin(int) - Method in class polyglot.util.SimpleCodeWriter
 
breakAll - Variable in class polyglot.util.SimpleCodeWriter
 
breakAll - Variable in class polyglot.util.SimpleCodeWriter.State
 

C

children() - Method in interface edu.cornell.cs.cs4120.util.VisualizableTreeNode
Returns an iterable of this node's children (direct descendants).
close() - Method in class polyglot.util.CodeWriter
Flush all formatted text, reset formatter state, and close the underlying writer.
close() - Method in class polyglot.util.OptimalCodeWriter
 
close() - Method in class polyglot.util.SimpleCodeWriter
 
CodeWriter - Class in polyglot.util
A CodeWriter is a pretty-printing engine.
CodeWriter() - Constructor for class polyglot.util.CodeWriter
 
CodeWriterTreePrinter - Class in edu.cornell.cs.cs4120.util
An TreePrinter implementation designed to print ASTs through a provided CodeWriter.
CodeWriterTreePrinter(CodeWriter) - Constructor for class edu.cornell.cs.cs4120.util.CodeWriterTreePrinter
Constructs a new TreePrinter instance that prints programs using the given CodeWriter.
CodeWriterTreePrinter(OutputStream) - Constructor for class edu.cornell.cs.cs4120.util.CodeWriterTreePrinter
Constructs a new TreePrinter instance that prints programs using to the given stream.
columnEnd() - Method in interface edu.cornell.cs.cs4120.xi.Position
Returns the column number of the last character of this position.
columnStart() - Method in interface edu.cornell.cs.cs4120.xi.Position
Returns the column number of the first character of this position.
CompilationException - Exception in edu.cornell.cs.cs4120.xi
An exception indicating an invalid Xi program.
CompilationException(Position) - Constructor for exception edu.cornell.cs.cs4120.xi.CompilationException
Constructs a generic compilation exception indicating offending code at the given position.
CompilationException(String, Position) - Constructor for exception edu.cornell.cs.cs4120.xi.CompilationException
Constructs a compilation exception indicating offending code at the given position with the given message as a reason.
CompilationUnitLexerFactory - Interface in edu.cornell.cs.cs4120.testing
A factory for instantiating lexer instances that also takes the name of the compilation unit.
current - Variable in class polyglot.util.OptimalCodeWriter
 

D

debug - Static variable in class polyglot.util.OptimalCodeWriter
 
DefaultLexerFactory - Class in edu.cornell.cs.cs4120.testing
A worthless default LexerFactory implementation.
DefaultLexerFactory() - Constructor for class edu.cornell.cs.cs4120.testing.DefaultLexerFactory
 
DefaultParserFactory - Class in edu.cornell.cs.cs4120.testing
A worthless default ParserFactory implementation.
DefaultParserFactory() - Constructor for class edu.cornell.cs.cs4120.testing.DefaultParserFactory
 

E

edu.cornell.cs.cs4120.testing - package edu.cornell.cs.cs4120.testing
Interfaces that CS 4120 groups should implement to help the course staff test their work.
edu.cornell.cs.cs4120.util - package edu.cornell.cs.cs4120.util
Common utilities.
edu.cornell.cs.cs4120.xi - package edu.cornell.cs.cs4120.xi
Classes and interfaces relating to Xi source.
edu.cornell.cs.cs4120.xi.lexer - package edu.cornell.cs.cs4120.xi.lexer
Classes and interfaces for lexing (or tokenizing) source code Nothing should depend on anything in this package except for code related to parsing.
edu.cornell.cs.cs4120.xi.lexer.cup - package edu.cornell.cs.cs4120.xi.lexer.cup
An adapter that allows Lexer instances to interface with CUP-generated parsers.
edu.cornell.cs.cs4120.xi.parser - package edu.cornell.cs.cs4120.xi.parser
Interfaces for parsing Xi source.
end() - Method in class polyglot.util.CodeWriter
Terminate the most recent outstanding begin.
end() - Method in class polyglot.util.OptimalCodeWriter
Terminate the most recent outstanding begin.
end() - Method in class polyglot.util.SimpleCodeWriter
 
equals(Object) - Method in interface edu.cornell.cs.cs4120.xi.lexer.Token
Returns whether two tokens are equal.
equals(Object) - Method in interface edu.cornell.cs.cs4120.xi.Position
Returns whether two positions are equal.

F

flush() - Method in class polyglot.util.CodeWriter
Flush all formatted text to the underlying writer.
flush(boolean) - Method in class polyglot.util.CodeWriter
Like flush, but passing format=false causes output to be generated in the fastest way possible, with all breaks broken.
flush() - Method in class polyglot.util.OptimalCodeWriter
Send out the current batch of text to be formatted.
flush(boolean) - Method in class polyglot.util.OptimalCodeWriter
Like flush, but passing format=false causes output to be generated in the fastest way possible, with all breaks broken.
flush() - Method in class polyglot.util.SimpleCodeWriter
 
flush(boolean) - Method in class polyglot.util.SimpleCodeWriter
 
format_calls - Static variable in class polyglot.util.OptimalCodeWriter
 

G

getPosition() - Method in exception edu.cornell.cs.cs4120.xi.CompilationException
Returns the position in the offending Xi code.

I

input - Variable in class polyglot.util.OptimalCodeWriter
 

L

label() - Method in interface edu.cornell.cs.cs4120.util.VisualizableTreeNode
Returns a reasonably short label for this node, for the purposes of visualization.
Lexer - Interface in edu.cornell.cs.cs4120.xi.lexer
A lexer (or scanner or tokenizer) for the Xi language.
LexerAdapter - Class in edu.cornell.cs.cs4120.xi.lexer.cup
An adapter that allows Lexer instances to interface as CUP Scanners.
LexerAdapter(Lexer, Class<?>) - Constructor for class edu.cornell.cs.cs4120.xi.lexer.cup.LexerAdapter
Constructs an adapter for the given lexer and CUP-generated symbol class.
LexerFactory - Interface in edu.cornell.cs.cs4120.testing
A factory for instantiating lexer instances.
lineEnd() - Method in interface edu.cornell.cs.cs4120.xi.Position
Returns the line number of the last character of this position.
lineStart() - Method in interface edu.cornell.cs.cs4120.xi.Position
Returns the line number of the first character of this position.
lmargin - Variable in class polyglot.util.SimpleCodeWriter
 
lmargin - Variable in class polyglot.util.SimpleCodeWriter.State
 
lmargins - Variable in class polyglot.util.SimpleCodeWriter
 

N

newLexer(Reader, String) - Method in interface edu.cornell.cs.cs4120.testing.CompilationUnitLexerFactory
Creates a lexer that reads tokens from the given reader.
newLexer(Reader) - Method in class edu.cornell.cs.cs4120.testing.DefaultLexerFactory
 
newLexer(Reader) - Method in interface edu.cornell.cs.cs4120.testing.LexerFactory
Creates a lexer that reads tokens from the given reader.
newline() - Method in class polyglot.util.CodeWriter
Force a newline.
newline(int) - Method in class polyglot.util.CodeWriter
Like newline(), but forces a newline with a specified indentation.
newline(int, int) - Method in class polyglot.util.CodeWriter
newline with a specified indentation and level.
newline() - Method in class polyglot.util.OptimalCodeWriter
This method should be used sparingly; usually a call to allowBreak is preferable because forcing a newline also causes all breaks in containing blocks to be broken.
newline(int, int) - Method in class polyglot.util.OptimalCodeWriter
Like newline(), but forces a newline with a specified indentation.
newline() - Method in class polyglot.util.SimpleCodeWriter
 
newline(int, int) - Method in class polyglot.util.SimpleCodeWriter
 
newParser(Reader) - Method in class edu.cornell.cs.cs4120.testing.DefaultParserFactory
 
newParser(Reader) - Method in interface edu.cornell.cs.cs4120.testing.ParserFactory
Creates a parser that reads from the given reader.
next() - Method in interface edu.cornell.cs.cs4120.xi.lexer.Lexer
Returns the next token in the input.
next_token() - Method in class edu.cornell.cs.cs4120.xi.lexer.cup.LexerAdapter
Returns a ComplexSymbolFactory.ComplexSymbol corresponding to the lexer's next token.

O

OptimalCodeWriter - Class in polyglot.util
The pretty-printing algorithm is loosely based on the Modula-3 pretty-printer, and on notes by Greg Nelson.
OptimalCodeWriter(OutputStream, int) - Constructor for class polyglot.util.OptimalCodeWriter
Create a OptimalCodeWriter object with output stream o and width width_.
OptimalCodeWriter(PrintWriter, int) - Constructor for class polyglot.util.OptimalCodeWriter
Create a OptimalCodeWriter object.
OptimalCodeWriter(Writer, int) - Constructor for class polyglot.util.OptimalCodeWriter
Create a OptimalCodeWriter object.
output - Variable in class polyglot.util.OptimalCodeWriter
 
output - Variable in class polyglot.util.SimpleCodeWriter
 

P

parse() - Method in interface edu.cornell.cs.cs4120.xi.parser.Parser
Returns an abstract syntax representation of a Xi program.
Parser - Interface in edu.cornell.cs.cs4120.xi.parser
A parser for the Xi language.
ParserFactory - Interface in edu.cornell.cs.cs4120.testing
A factory for instantiating parser instances.
polyglot.util - package polyglot.util
Classes to provide compiler utilities, such as data structures and convenience classes.
pos - Variable in class polyglot.util.SimpleCodeWriter
 
position() - Method in interface edu.cornell.cs.cs4120.xi.AbstractSyntaxNode
The source file position where this node occurs.
position() - Method in interface edu.cornell.cs.cs4120.xi.lexer.Token
The position at which this token occurs in the source.
Position - Interface in edu.cornell.cs.cs4120.xi
The position of a syntactic entity within Xi source.
precompute - Static variable in class polyglot.util.OptimalCodeWriter
 
print(VisualizableTreeNode) - Method in class edu.cornell.cs.cs4120.util.CodeWriterTreePrinter
 
print(VisualizableTreeNode) - Method in interface edu.cornell.cs.cs4120.util.TreePrinter
Prints a tree.

R

remove() - Method in interface edu.cornell.cs.cs4120.xi.lexer.Lexer
This operation is not supported.
rmargin - Variable in class polyglot.util.SimpleCodeWriter
 

S

showInput - Static variable in class polyglot.util.OptimalCodeWriter
 
SimpleCodeWriter - Class in polyglot.util
SimpleCodeWriter is a simple, fast, bulletproof implementation of the CodeWriter interface.
SimpleCodeWriter(OutputStream, int) - Constructor for class polyglot.util.SimpleCodeWriter
 
SimpleCodeWriter(PrintWriter, int) - Constructor for class polyglot.util.SimpleCodeWriter
 
SimpleCodeWriter(Writer, int) - Constructor for class polyglot.util.SimpleCodeWriter
 
SimpleCodeWriter.State - Class in polyglot.util
 

T

Token - Interface in edu.cornell.cs.cs4120.xi.lexer
A token (also called a symbol or a lexeme) in the language.
TokenType - Enum in edu.cornell.cs.cs4120.xi.lexer
A type of token in the source language.
top - Static variable in class polyglot.util.OptimalCodeWriter
 
toString() - Method in exception edu.cornell.cs.cs4120.xi.CompilationException
Returns a human-friendly representation of this exception, including the compilation unit (if available), the line number, and the error message.
toString() - Method in class polyglot.util.CodeWriter
Return a readable representation of all the structured input given to the CodeWriter since the last flush.
toString() - Method in class polyglot.util.OptimalCodeWriter
Return a readable representation of all the structured input given to the CodeWriter since the last flush.
toString() - Method in class polyglot.util.SimpleCodeWriter
toString is not really supported by this implementation.
trace_indent - Variable in class polyglot.util.OptimalCodeWriter
Amount to indent during tracing.
TreePrinter - Interface in edu.cornell.cs.cs4120.util
Pretty-prints a tree to some provided output.
type() - Method in interface edu.cornell.cs.cs4120.xi.lexer.Token
The type of this token.

U

unifiedBreak(int, int, String, int) - Method in class polyglot.util.CodeWriter
Insert a unified break.
unifiedBreak(int) - Method in class polyglot.util.CodeWriter
The most common use of "unifiedBreak": level 1, with an alternative of a single space.
unifiedBreak(int, int, String, int) - Method in class polyglot.util.OptimalCodeWriter
 
unifiedBreak(int, int, String, int) - Method in class polyglot.util.SimpleCodeWriter
 
unit() - Method in interface edu.cornell.cs.cs4120.xi.Position
Returns the compilation unit (typically a file name) of the syntactic entity, or null if the compilation unit is unavailable or inapplicable (such as in an anonymous compilation unit).

V

value() - Method in interface edu.cornell.cs.cs4120.xi.lexer.Token
The string of characters comprising the token in the source.
valueOf(Token) - Method in class edu.cornell.cs.cs4120.xi.lexer.cup.LexerAdapter
Returns the object that will serve as the Symbol.value for symbols returned by this Scanner.
valueOf(String) - Static method in enum edu.cornell.cs.cs4120.xi.lexer.TokenType
Returns the enum constant of this type with the specified name.
values() - Static method in enum edu.cornell.cs.cs4120.xi.lexer.TokenType
Returns an array containing the constants of this enum type, in the order they are declared.
VisualizableTreeNode - Interface in edu.cornell.cs.cs4120.util
A node in a tree that provides enough information to visualize the structure of the tree.
visualize - Static variable in class polyglot.util.OptimalCodeWriter
 

W

width - Variable in class polyglot.util.OptimalCodeWriter
 
width - Variable in class polyglot.util.SimpleCodeWriter
 
write(String) - Method in class polyglot.util.CodeWriter
Print the string s verbatim on the output stream.
write(String, int) - Method in class polyglot.util.CodeWriter
Print the string s on the output stream.
write(String) - Method in class polyglot.util.OptimalCodeWriter
 
write(String, int) - Method in class polyglot.util.OptimalCodeWriter
 
write(String) - Method in class polyglot.util.SimpleCodeWriter
 
write(String, int) - Method in class polyglot.util.SimpleCodeWriter
 

A B C D E F G I L N O P R S T U V W