cgp.translators
Class AntlrCGIFParser
java.lang.Object
|
+--antlr.Parser
|
+--antlr.LLkParser
|
+--cgp.translators.AntlrCGIFParser
- public class AntlrCGIFParser
- extends antlr.LLkParser
- implements AntlrCGIFTokenTypes
A Notio CGIF parser for a conceptual graph language which embodies Guy
Mineau's process formalism.
Copyright (C) 2001 David Benn
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Note that this parser is based upon the modified June 2001 CG Standard
found at: http://www.cs.nmsu.edu/~hdp/CGTools/cgstand/cgstandnmsu.html
This will be referred to as "The Standard" or "The CGIF Standard" herein.
All parser and lexer productions are preceded by the text from the
aforementioned URL given for each production or its equivalent, although
the ordering may not be as found in that document depending upon what
makes sense for the ANTLR-based grammar. Notes and questions regarding
the original productions have been added.
David Benn, June 2001
Fields inherited from class antlr.LLkParser |
k |
Fields inherited from class antlr.Parser |
astFactory,
ignoreInvalidDebugCalls,
inputState,
returnAST,
tokenNames |
Fields inherited from interface cgp.translators.AntlrCGIFTokenTypes |
AMPERSAND,
AT,
COLON,
COMMA,
COMMENT,
DIGIT,
DOT,
EOF,
EXPONENT,
FLOAT_NUM,
HASH,
IDENTIFIER,
INT_NUM,
LANGLE,
LBRACE,
LBRACK,
LETTER,
LITERAL_either,
LITERAL_if,
LITERAL_lambda,
LITERAL_or,
LITERAL_sc,
LITERAL_then,
LPAREN,
NAME,
NEGATION_PREFIX,
NULL_TREE_LOOKAHEAD,
NUMBER,
PERCENT,
QUESTION,
QUOTEDSTR,
RANGLE,
RBRACE,
RBRACK,
RPAREN,
STAR,
TILDE,
UNSIGNEDINT,
VERTBAR,
WS |
Methods inherited from class antlr.LLkParser |
consume,
LA,
LT,
trace,
traceIn,
traceOut |
Methods inherited from class antlr.Parser |
addMessageListener,
addParserListener,
addParserMatchListener,
addParserTokenListener,
addSemanticPredicateListener,
addSyntacticPredicateListener,
addTraceListener,
consumeUntil,
consumeUntil,
defaultDebuggingSetup,
getAST,
getASTFactory,
getFilename,
getInputState,
getInputState,
getTokenName,
getTokenNames,
isDebugMode,
mark,
match,
match,
matchNot,
panic,
removeMessageListener,
removeParserListener,
removeParserMatchListener,
removeParserTokenListener,
removeSemanticPredicateListener,
removeSyntacticPredicateListener,
removeTraceListener,
reportError,
reportError,
reportWarning,
rewind,
setASTFactory,
setASTNodeClass,
setASTNodeType,
setDebugMode,
setFilename,
setIgnoreInvalidDebugCalls,
setTokenBuffer |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
COPYING_SCHEME
private notio.CopyingScheme COPYING_SCHEME
kBase
private notio.KnowledgeBase kBase
conceptTypes
private notio.ConceptTypeHierarchy conceptTypes
relationTypes
private notio.RelationTypeHierarchy relationTypes
contexts
private ContextScopeStack contexts
_tokenNames
public static final java.lang.String[] _tokenNames
_tokenSet_0_data_
private static final long[] _tokenSet_0_data_
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0
_tokenSet_1_data_
private static final long[] _tokenSet_1_data_
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1
_tokenSet_2_data_
private static final long[] _tokenSet_2_data_
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
_tokenSet_3_data_
private static final long[] _tokenSet_3_data_
_tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_3
AntlrCGIFParser
public AntlrCGIFParser(AntlrCGIFLexer lexer,
notio.KnowledgeBase kBase)
AntlrCGIFParser
protected AntlrCGIFParser(antlr.TokenBuffer tokenBuf,
int k)
AntlrCGIFParser
public AntlrCGIFParser(antlr.TokenBuffer tokenBuf)
AntlrCGIFParser
protected AntlrCGIFParser(antlr.TokenStream lexer,
int k)
AntlrCGIFParser
public AntlrCGIFParser(antlr.TokenStream lexer)
AntlrCGIFParser
public AntlrCGIFParser(antlr.ParserSharedInputState state)
actor
public final notio.Actor actor()
throws antlr.RecognitionException,
antlr.TokenStreamException
type
public final java.lang.String type()
throws antlr.RecognitionException,
antlr.TokenStreamException
arc
public final notio.Concept arc()
throws antlr.RecognitionException,
antlr.TokenStreamException
concept
public final notio.Concept concept()
throws antlr.RecognitionException,
antlr.TokenStreamException
boundLabel
public final notio.Concept boundLabel()
throws antlr.RecognitionException,
antlr.TokenStreamException
cgStream
public final notio.Graph[] cgStream()
throws antlr.RecognitionException,
antlr.TokenStreamException
cg
public final notio.Graph cg()
throws antlr.RecognitionException,
antlr.TokenStreamException
specialContext
public final void specialContext(notio.Graph g)
throws antlr.RecognitionException,
antlr.TokenStreamException
specialConLabel
public final void specialConLabel()
throws antlr.RecognitionException,
antlr.TokenStreamException
relation
public final notio.Relation relation()
throws antlr.RecognitionException,
antlr.TokenStreamException
referent
public final void referent(notio.Concept c)
throws antlr.RecognitionException,
antlr.TokenStreamException
corefLinks
public final notio.Concept corefLinks(ContextScope scope,
notio.Concept c)
throws antlr.RecognitionException,
antlr.TokenStreamException
conjuncts
public final void conjuncts()
throws antlr.RecognitionException,
antlr.TokenStreamException
typeTerm
public final void typeTerm()
throws antlr.RecognitionException,
antlr.TokenStreamException
defLabel
public final void defLabel(ContextScope enclosingContext,
notio.Concept theConcept)
throws antlr.RecognitionException,
antlr.TokenStreamException
descriptor
public final void descriptor(notio.Referent r)
throws antlr.RecognitionException,
antlr.TokenStreamException
structure
public final void structure()
throws antlr.RecognitionException,
antlr.TokenStreamException
designator
public final void designator(notio.Referent r)
throws antlr.RecognitionException,
antlr.TokenStreamException
literal
public final java.lang.Object literal()
throws antlr.RecognitionException,
antlr.TokenStreamException
locator
public final notio.Designator locator()
throws antlr.RecognitionException,
antlr.TokenStreamException
quantifier
public final notio.QuantifierMacro quantifier()
throws antlr.RecognitionException,
antlr.TokenStreamException
disjuncts
public final void disjuncts()
throws antlr.RecognitionException,
antlr.TokenStreamException
formalParameter
public final void formalParameter()
throws antlr.RecognitionException,
antlr.TokenStreamException
indexical
public final java.lang.String indexical()
throws antlr.RecognitionException,
antlr.TokenStreamException
individualMarker
public final java.lang.String individualMarker()
throws antlr.RecognitionException,
antlr.TokenStreamException
lambdaExpression
public final void lambdaExpression()
throws antlr.RecognitionException,
antlr.TokenStreamException
signature
public final void signature()
throws antlr.RecognitionException,
antlr.TokenStreamException
number
public final java.lang.Number number()
throws antlr.RecognitionException,
antlr.TokenStreamException
negation
public final notio.Relation negation()
throws antlr.RecognitionException,
antlr.TokenStreamException
typeLabel
public final void typeLabel()
throws antlr.RecognitionException,
antlr.TokenStreamException
typeExpression
public final void typeExpression()
throws antlr.RecognitionException,
antlr.TokenStreamException