cgp
Class CGPParser

java.lang.Object
  |
  +--antlr.Parser
        |
        +--antlr.LLkParser
              |
              +--cgp.CGPParser

public class CGPParser
extends antlr.LLkParser
implements CGPTokenTypes

A conceptual graph language which embodies Guy Mineau's process formalism. Copyright (C) 2000 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. Conceptual Graph Processes parser. David Benn, June-October 2000


Field Summary
static java.lang.String[] _tokenNames
           
static antlr.collections.impl.BitSet _tokenSet_0
           
private static long[] _tokenSet_0_data_
           
static antlr.collections.impl.BitSet _tokenSet_1
           
private static long[] _tokenSet_1_data_
           
static antlr.collections.impl.BitSet _tokenSet_2
           
private static long[] _tokenSet_2_data_
           
static antlr.collections.impl.BitSet _tokenSet_3
           
private static long[] _tokenSet_3_data_
           
static antlr.collections.impl.BitSet _tokenSet_4
           
private static long[] _tokenSet_4_data_
           
static antlr.collections.impl.BitSet _tokenSet_5
           
private static long[] _tokenSet_5_data_
           
 
Fields inherited from class antlr.LLkParser
k
 
Fields inherited from class antlr.Parser
astFactory, ignoreInvalidDebugCalls, inputState, returnAST, tokenNames
 
Fields inherited from interface cgp.CGPTokenTypes
ACTOR_DEF, ACTUAL_ARGS, AND, ANON_FUN_DEF, ATTR_ASSIGN, ATTR_SELECTION, BLOCK, CALL, COLON, COMMA, COMMENT, CONCEPT_LITERAL, CONDITION, DIGIT, DOT, EMPTY_LIST, EOF, EQ, FILE_VALUE, FOREACH_STATEMENT, FUN_DEF, GE, GETS, GRAPH_LITERAL, GRAPH_STRING, GT, IDENT, IF_STATEMENT, IS, LAMBDA_DEF, LBRACE, LBRACK, LE, LETTER, LIST, LIST_ASSIGN, LIST_SELECTION, LITERAL_action, LITERAL_activate, LITERAL_actor, LITERAL_and, LITERAL_apply, LITERAL_assert, LITERAL_boolean, LITERAL_concept, LITERAL_div, LITERAL_do, LITERAL_else, LITERAL_end, LITERAL_exit, LITERAL_false, LITERAL_file, LITERAL_foreach, LITERAL_function, LITERAL_graph, LITERAL_if, LITERAL_in, LITERAL_initial, LITERAL_is, LITERAL_lambda, LITERAL_last, LITERAL_list, LITERAL_mod, LITERAL_new, LITERAL_not, LITERAL_number, LITERAL_option, LITERAL_or, LITERAL_out, LITERAL_post, LITERAL_pre, LITERAL_print, LITERAL_println, LITERAL_process, LITERAL_relation, LITERAL_retract, LITERAL_return, LITERAL_rule, LITERAL_string, LITERAL_system, LITERAL_then, LITERAL_true, LITERAL_undefined, LITERAL_while, LPAREN, LT, MATCH_EXPRESSION, MEMBER_FUNCALL, METACHAR, MINUS, MUL, MUTATE_KB_EXPRESSION, NE, NEW_VALUE, NOT, NULL_TREE_LOOKAHEAD, NUMBER, OPTION_LIST, OR, PLUS, POST_DEF, PRE_DEF, PROCESS_DEF, RBRACE, RBRACK, RPAREN, RULE_DEF, SEMI, STRING, TILDE, TYPE_DECL, TYPE_VALUE, VALUE_SELECTOR, VAR_ASSIGN, WHILE_STATEMENT, WS
 
Constructor Summary
  CGPParser(antlr.ParserSharedInputState state)
           
  CGPParser(antlr.TokenBuffer tokenBuf)
           
protected CGPParser(antlr.TokenBuffer tokenBuf, int k)
           
  CGPParser(antlr.TokenStream lexer)
           
protected CGPParser(antlr.TokenStream lexer, int k)
           
 
Method Summary
 void actorDef()
           
 void actorParamKind()
           
 void actualArgs()
           
 void addExpr()
           
 void andExpr()
           
 void anonFunDef()
           
 void assignment()
           
 void block()
           
 void boolValue()
           
 void call()
           
 void callExpr()
           
 void conceptValue()
           
 void condition()
           
 void expr()
          Expression productions ** Precedence of operators (from lowest to highest) ----------------------- Associativity ------------- or L and L > < >= <= == != is (is: type equivalence operator) L + - L * div mod L - not (unary negation and logical complement) L [] .
 void factor()
           
 void fileValue()
           
 void foreachStatement()
           
 void funDef()
           
 void graphValue()
           
 void ifStatement()
           
 void imaginaryTokenDefinitions()
           
 void intrinsicStatement()
           
 void lambdaDef()
           
 void listValue()
           
 void matchExpression()
           
 void memberFunCall()
           
 void mulExpr()
           
 void mutateKBExpression()
           
 void newValue()
           
 void nodeKind()
           
 void optionList()
           
 void postDef()
           
 void preDef()
           
 void processDef()
           
 void processParamKind()
           
 void program()
           
 void relExpr()
           
 void ruleDef()
           
 void selectionExpr()
           
 void statement()
           
 void topLevelStatement()
           
 void typeDecl()
           
 void typeValue()
           
 void unaryExpr()
           
 void whileStatement()
           
 
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
 

Field Detail

_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

_tokenSet_4_data_

private static final long[] _tokenSet_4_data_

_tokenSet_4

public static final antlr.collections.impl.BitSet _tokenSet_4

_tokenSet_5_data_

private static final long[] _tokenSet_5_data_

_tokenSet_5

public static final antlr.collections.impl.BitSet _tokenSet_5
Constructor Detail

CGPParser

protected CGPParser(antlr.TokenBuffer tokenBuf,
                    int k)

CGPParser

public CGPParser(antlr.TokenBuffer tokenBuf)

CGPParser

protected CGPParser(antlr.TokenStream lexer,
                    int k)

CGPParser

public CGPParser(antlr.TokenStream lexer)

CGPParser

public CGPParser(antlr.ParserSharedInputState state)
Method Detail

imaginaryTokenDefinitions

public final void imaginaryTokenDefinitions()
                                     throws antlr.RecognitionException,
                                            antlr.TokenStreamException

program

public final void program()
                   throws antlr.RecognitionException,
                          antlr.TokenStreamException

topLevelStatement

public final void topLevelStatement()
                             throws antlr.RecognitionException,
                                    antlr.TokenStreamException

nodeKind

public final void nodeKind()
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException

typeDecl

public final void typeDecl()
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException

funDef

public final void funDef()
                  throws antlr.RecognitionException,
                         antlr.TokenStreamException

lambdaDef

public final void lambdaDef()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

actorDef

public final void actorDef()
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException

processDef

public final void processDef()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException

optionList

public final void optionList()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException

statement

public final void statement()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

block

public final void block()
                 throws antlr.RecognitionException,
                        antlr.TokenStreamException

expr

public final void expr()
                throws antlr.RecognitionException,
                       antlr.TokenStreamException
Expression productions ** Precedence of operators (from lowest to highest) ----------------------- Associativity ------------- or L and L > < >= <= == != is (is: type equivalence operator) L + - L * div mod L - not (unary negation and logical complement) L [] . (list indexing and attribute/method selection operators) Notes: - The above prec/assoc table (except for rel ops) is a subset of Java's but some names have changed for readability's sake. - and & or are NOT short circuit operators.

actorParamKind

public final void actorParamKind()
                          throws antlr.RecognitionException,
                                 antlr.TokenStreamException

processParamKind

public final void processParamKind()
                            throws antlr.RecognitionException,
                                   antlr.TokenStreamException

ruleDef

public final void ruleDef()
                   throws antlr.RecognitionException,
                          antlr.TokenStreamException

preDef

public final void preDef()
                  throws antlr.RecognitionException,
                         antlr.TokenStreamException

postDef

public final void postDef()
                   throws antlr.RecognitionException,
                          antlr.TokenStreamException

matchExpression

public final void matchExpression()
                           throws antlr.RecognitionException,
                                  antlr.TokenStreamException

mutateKBExpression

public final void mutateKBExpression()
                              throws antlr.RecognitionException,
                                     antlr.TokenStreamException

intrinsicStatement

public final void intrinsicStatement()
                              throws antlr.RecognitionException,
                                     antlr.TokenStreamException

ifStatement

public final void ifStatement()
                       throws antlr.RecognitionException,
                              antlr.TokenStreamException

whileStatement

public final void whileStatement()
                          throws antlr.RecognitionException,
                                 antlr.TokenStreamException

foreachStatement

public final void foreachStatement()
                            throws antlr.RecognitionException,
                                   antlr.TokenStreamException

factor

public final void factor()
                  throws antlr.RecognitionException,
                         antlr.TokenStreamException

actualArgs

public final void actualArgs()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException

memberFunCall

public final void memberFunCall()
                         throws antlr.RecognitionException,
                                antlr.TokenStreamException

call

public final void call()
                throws antlr.RecognitionException,
                       antlr.TokenStreamException

assignment

public final void assignment()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException

condition

public final void condition()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

andExpr

public final void andExpr()
                   throws antlr.RecognitionException,
                          antlr.TokenStreamException

relExpr

public final void relExpr()
                   throws antlr.RecognitionException,
                          antlr.TokenStreamException

addExpr

public final void addExpr()
                   throws antlr.RecognitionException,
                          antlr.TokenStreamException

mulExpr

public final void mulExpr()
                   throws antlr.RecognitionException,
                          antlr.TokenStreamException

unaryExpr

public final void unaryExpr()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

selectionExpr

public final void selectionExpr()
                         throws antlr.RecognitionException,
                                antlr.TokenStreamException

callExpr

public final void callExpr()
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException

boolValue

public final void boolValue()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

listValue

public final void listValue()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

graphValue

public final void graphValue()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException

conceptValue

public final void conceptValue()
                        throws antlr.RecognitionException,
                               antlr.TokenStreamException

fileValue

public final void fileValue()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

anonFunDef

public final void anonFunDef()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException

newValue

public final void newValue()
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException

typeValue

public final void typeValue()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException