Package antlr
package antlr
-
ClassDescriptionThis class contains information about how an action was translated (using the AST conversion rules).Intermediate data class holds information about an alternativeA list of alternativesSimple lexer/parser for reading token definition files in support of the import/export vocab option for grammars.AST Support code shared by TreeParser and Parser.There is only one instance of this classASTPair: utility class used for manipulating a pair of ASTs representing the current AST root and current AST sibling.A Child-Sibling Tree.BlockContext stores the information needed when creating an alternative (list of elements).All alternative blocks are "terminated" by BlockEndElements unless they are rule blocks (in which case they use RuleEndElement).Interface used by BitSet to format elements of the set when converting to stringA circular buffer object used by CharBufferAnything that goes wrong while generating a stream of charactersWrap an IOException in a CharStreamExceptionA generic ANTLR code generator.Common AST node implementationA CommonAST whose initialization copies hidden token information from the Token used to create a node.Generate MyParser.cpp, MyParser.hpp, MyLexer.cpp, MyLexer.hpp and MyParserTokenTypes.hppGenerates MyParser.cs, MyLexer.cs and MyParserTokenTypes.csDefineGrammarSymbols is a behavior for the ANTLRParser that adds all the token and rule symbols to the grammar symbol table.Generate MyParser.txt, MyLexer.txt and MyParserTokenTypes.txtGenerate P.sgml, a cross-linked representation of P with or without actionsSimple class to dump the contents of an AST to the outputA Grammar holds a set of rules (which are stored in a symbol table).A GrammarAnalyzer computes lookahead from Grammar (which contains a grammar symbol table) and can then answer questions about the grammar.A GrammarAtom is either a token ref, a character ref, or string.A GrammarElement is a generic node in our data structure that holds a grammar in memory.A GrammarSymbol is a generic symbol that can be added to the symbol table for a grammar.Generate P.html, a cross-linked representation of P with or without actionsStatic implementation of the TokenManager, used for importVocab optionA Stream of characters fed to the lexer from a InputStream that can be rewound via mark()/rewind() methods.Generate MyParser.java, MyLexer.java and MyParserTokenTypes.javaDefines a strategy that can be used to manage the printwriter being used to write JavaCodeGenerator output TODO generalize so all code gens could use?Lexer-specific grammar subclassThis object contains the data associated with an input stream of characters.A linear-approximate LL(k) grammar analzyer.An LL(k) parser.This object holds all information needed to represent the lookahead for any particular lookahead computation for a single lookahead depth.Parser-specific grammar subclassThis object contains the data associated with an input stream of tokens.PreservingFileWriter only overwrites target if the new file is different.Generate MyParser.java, MyLexer.java and MyParserTokenTypes.javaA list of alternatives and info contained in the rule definition.Contains a list of all places that reference this enclosing rule.A token is minimally a token type.Interface that describes the set of defined tokensA private circular buffer object used by the token bufferThis object is a TokenStream that passes through all tokens except for those that you tell it to discard.Anything that goes wrong while generating a stream of tokens.This object filters a token stream coming from a lexer or another TokenStream so that only certain token channels get transmitted to the parser.Wraps an IOException in a TokenStreamExceptionWraps a RecognitionException in a TokenStreamException so you can pass it along.Aborted recognition of current token.This token stream tracks the *entire* token stream coming from a lexer, but does not pass on the whitespace (or whatever else you want to discard) to the parser.I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp instructions.A token stream MUX (multiplexor) knows about n token streams and can multiplex them onto the same channel for use by token stream consumer like a parser.This token knows what index 0..n-1 it is from beginning of stream.The context needed to add root,child elements to a Tree.A TreeElement is a block with one alternative and a root nodeThis object contains the data associated with an input AST.Parser-specific grammar subclass