com.irs.jam
Class JAMParser

java.lang.Object
  |
  +--com.irs.jam.JAMParser
All Implemented Interfaces:
JAMParserConstants

public class JAMParser
extends java.lang.Object
implements JAMParserConstants


Field Summary
 java.lang.String _filename
           
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 JAMParserTokenManager token_source
           
 
Fields inherited from interface com.irs.jam.JAMParserConstants
ACHIEVE, ASSERT, ASSIGN, charac, CLASS_IDENTIFIER, DEFAULT, delim, digit, ELSE, ELSEIF, EOF, EXECUTE, EXP, FACT, FACT_DECL, FAIL, FLOAT, FORMAL_COMMENT, GOAL_DECL, IDENTIFIER, IF, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, IN_STRING, INTEGER, KEYWORD_BY, KEYWORD_NOT_BY, KEYWORD_TEST, KEYWORD_UTILITY, letter, LOAD, MAINTAIN, MULTI_LINE_COMMENT, NEXTFACT, number0, number1, number2, OBSERVER_DECL, PARSE, PERFORM, PLAN_ATTRIBUTES, PLAN_BODY, PLAN_BODY_AND, PLAN_BODY_ATOMIC, PLAN_BODY_DO, PLAN_BODY_DO_ALL, PLAN_BODY_DO_ANY, PLAN_BODY_OR, PLAN_BODY_PARALLEL, PLAN_BODY_WAIT, PLAN_BODY_WHEN, PLAN_BODY_WHILE, PLAN_CONCLUDESPEC, PLAN_CONTEXT, PLAN_DOC, PLAN_EFFECTS, PLAN_FAILURE, PLAN_GOALSPEC, PLAN_NAME, PLAN_PRECONDITION, PLAN_START, PLAN_UTILITY, POST, QUERY, RETRACT, RETRIEVE, RETRIEVEALL, SIGN, SINGLE_LINE_COMMENT, SPECIAL_FUNCTION_NAME, STRING, SUCCEED, TEST, tokenImage, UNPOST, UPDATE, VARIABLE, ws, WS
 
Constructor Summary
JAMParser()
           
JAMParser(java.io.InputStream stream)
           
JAMParser(JAMParserTokenManager tm)
           
JAMParser(java.io.Reader stream)
           
 
Method Summary
 Action action(Plan currentPlan, Interpreter interpreter)
           
 void agent_components(Interpreter interpreter)
           
 void buildInterpreter(java.lang.String filename, java.lang.String buf, Interpreter interpreter)
          Primary JAM interface to parser
 ConditionList condition_list(Plan currentPlan, Interpreter interpreter)
           
 Condition condition(Plan currentPlan, Interpreter interpreter)
           
 void disable_tracing()
           
 void enable_tracing()
           
 Action exec_action(Plan currentPlan, Interpreter interpreter)
           
 ExpList explist(Plan currentPlan, Interpreter interpreter)
           
 Expression expression(Plan currentPlan, Interpreter interpreter)
           
 void fact(Interpreter interpreter)
           
 FunctionCall funcall(Plan currentPlan, Interpreter interpreter)
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 GoalAction goal_action_basic(Plan currentPlan, Interpreter interpreter)
           
 GoalAction goal_action(Plan currentPlan, Interpreter interpreter)
           
 void goal(Interpreter interpreter)
           
static void main(java.lang.String[] args)
          Command-line interface to parser to facilitate testing.
 Action misc_action(Plan currentPlan, Interpreter interpreter)
           
 Interpreter ParseJamAgentDefinition(Interpreter interpreter)
           
 void parseString(Interpreter interpreter, java.lang.String filename, java.lang.String buf)
          Secondary JAM interface used to internalize agent constructs from strings during execution.
 void plan_attributes(Plan currentPlan)
           
 PlanConstruct plan_body_element(Plan currentPlan, Interpreter interpreter)
           
 PlanSequenceConstruct plan_body_elements(Plan currentPlan, Interpreter interpreter)
           
 void plan_body(Plan currentPlan, Interpreter interpreter)
           
 PlanSequenceConstruct plan_branch(Plan currentPlan, Interpreter interpreter)
           
 void plan_component(Plan currentPlan, Interpreter interpreter)
           
 void plan_components(Plan currentPlan, Interpreter interpreter)
           
 void plan_concludespec(Plan currentPlan, Interpreter interpreter)
           
 void plan_context(Plan currentPlan, Interpreter interpreter)
           
 void plan_doc(Plan currentPlan)
           
 void plan_effects(Plan currentPlan, Interpreter interpreter)
           
 void plan_failure(Plan currentPlan, Interpreter interpreter)
           
 void plan_goalspec(Plan currentPlan, Interpreter interpreter)
           
 void plan_name(Plan currentPlan)
           
 void plan_precondition(Plan currentPlan, Interpreter interpreter)
           
 void plan_utility(Plan currentPlan, Interpreter interpreter)
           
 void plan(Interpreter interpreter)
           
 Predicate predicate(Plan currentPlan, Interpreter interpreter)
           
 void ReInit(java.io.InputStream stream)
           
 void ReInit(JAMParserTokenManager tm)
           
 void ReInit(java.io.Reader stream)
           
 Relation relation(Plan currentPlan, Interpreter interpreter)
           
 Value value()
           
 java.lang.String variable()
           
 PlanConstruct wait_construct(Plan currentPlan, Interpreter interpreter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_filename

public java.lang.String _filename

token_source

public JAMParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

JAMParser

public JAMParser()

JAMParser

public JAMParser(java.io.InputStream stream)

JAMParser

public JAMParser(java.io.Reader stream)

JAMParser

public JAMParser(JAMParserTokenManager tm)
Method Detail

main

public static void main(java.lang.String[] args)
Command-line interface to parser to facilitate testing.

buildInterpreter

public void buildInterpreter(java.lang.String filename,
                             java.lang.String buf,
                             Interpreter interpreter)
                      throws ParseException
Primary JAM interface to parser

parseString

public void parseString(Interpreter interpreter,
                        java.lang.String filename,
                        java.lang.String buf)
Secondary JAM interface used to internalize agent constructs from strings during execution.

ParseJamAgentDefinition

public final Interpreter ParseJamAgentDefinition(Interpreter interpreter)
                                          throws ParseException

agent_components

public final void agent_components(Interpreter interpreter)
                            throws ParseException

goal

public final void goal(Interpreter interpreter)
                throws ParseException

fact

public final void fact(Interpreter interpreter)
                throws ParseException

plan

public final void plan(Interpreter interpreter)
                throws ParseException

plan_components

public final void plan_components(Plan currentPlan,
                                  Interpreter interpreter)
                           throws ParseException

plan_component

public final void plan_component(Plan currentPlan,
                                 Interpreter interpreter)
                          throws ParseException

plan_name

public final void plan_name(Plan currentPlan)
                     throws ParseException

plan_doc

public final void plan_doc(Plan currentPlan)
                    throws ParseException

plan_attributes

public final void plan_attributes(Plan currentPlan)
                           throws ParseException

plan_goalspec

public final void plan_goalspec(Plan currentPlan,
                                Interpreter interpreter)
                         throws ParseException

plan_concludespec

public final void plan_concludespec(Plan currentPlan,
                                    Interpreter interpreter)
                             throws ParseException

plan_context

public final void plan_context(Plan currentPlan,
                               Interpreter interpreter)
                        throws ParseException

plan_precondition

public final void plan_precondition(Plan currentPlan,
                                    Interpreter interpreter)
                             throws ParseException

plan_utility

public final void plan_utility(Plan currentPlan,
                               Interpreter interpreter)
                        throws ParseException

plan_effects

public final void plan_effects(Plan currentPlan,
                               Interpreter interpreter)
                        throws ParseException

plan_failure

public final void plan_failure(Plan currentPlan,
                               Interpreter interpreter)
                        throws ParseException

plan_body

public final void plan_body(Plan currentPlan,
                            Interpreter interpreter)
                     throws ParseException

plan_branch

public final PlanSequenceConstruct plan_branch(Plan currentPlan,
                                               Interpreter interpreter)
                                        throws ParseException

plan_body_elements

public final PlanSequenceConstruct plan_body_elements(Plan currentPlan,
                                                      Interpreter interpreter)
                                               throws ParseException

plan_body_element

public final PlanConstruct plan_body_element(Plan currentPlan,
                                             Interpreter interpreter)
                                      throws ParseException

wait_construct

public final PlanConstruct wait_construct(Plan currentPlan,
                                          Interpreter interpreter)
                                   throws ParseException

condition_list

public final ConditionList condition_list(Plan currentPlan,
                                          Interpreter interpreter)
                                   throws ParseException

condition

public final Condition condition(Plan currentPlan,
                                 Interpreter interpreter)
                          throws ParseException

action

public final Action action(Plan currentPlan,
                           Interpreter interpreter)
                    throws ParseException

exec_action

public final Action exec_action(Plan currentPlan,
                                Interpreter interpreter)
                         throws ParseException

misc_action

public final Action misc_action(Plan currentPlan,
                                Interpreter interpreter)
                         throws ParseException

goal_action

public final GoalAction goal_action(Plan currentPlan,
                                    Interpreter interpreter)
                             throws ParseException

goal_action_basic

public final GoalAction goal_action_basic(Plan currentPlan,
                                          Interpreter interpreter)
                                   throws ParseException

relation

public final Relation relation(Plan currentPlan,
                               Interpreter interpreter)
                        throws ParseException

expression

public final Expression expression(Plan currentPlan,
                                   Interpreter interpreter)
                            throws ParseException

explist

public final ExpList explist(Plan currentPlan,
                             Interpreter interpreter)
                      throws ParseException

value

public final Value value()
                  throws ParseException

variable

public final java.lang.String variable()
                                throws ParseException

funcall

public final FunctionCall funcall(Plan currentPlan,
                                  Interpreter interpreter)
                           throws ParseException

predicate

public final Predicate predicate(Plan currentPlan,
                                 Interpreter interpreter)
                          throws ParseException

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(JAMParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public final ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()