BNF for Lexer.jj

TOKENS

<DEFAULT> SKIP : {
" "
| "\t"
| "\n"
| "\r"
}

   
<DEFAULT> MORE : {
"//" : IN_SINGLE_LINE_COMMENT
| ";" : IN_SINGLE_LINE_COMMENT
| <"/**" ~["/"]> : IN_FORMAL_COMMENT
| "/*" : IN_MULTI_LINE_COMMENT
}

   
<IN_SINGLE_LINE_COMMENT> SPECIAL : {
<SINGLE_LINE_COMMENT: "\n" | "\r" | "\r\n"> : DEFAULT
}

   
<IN_FORMAL_COMMENT> SPECIAL : {
<FORMAL_COMMENT: "*/"> : DEFAULT
}

   
<IN_MULTI_LINE_COMMENT> SPECIAL : {
<MULTI_LINE_COMMENT: "*/"> : DEFAULT
}

   
<IN_SINGLE_LINE_COMMENT,IN_FORMAL_COMMENT,IN_MULTI_LINE_COMMENT> MORE : {
<~[]>
}

   
<DEFAULT> TOKEN : {
<LEFT_BRACKET: "(">
| <RIGHT_BRACKET: ")">
| <ALIAS: "@">
}

   
<DEFAULT> TOKEN : {
<DEFINE: "define">
| <DOMAIN: "domain">
| <REQUIREMENTS: ":requirements">
| <TYPES: ":types">
| <EITHER: "either">
| <CONSTANTS: ":constants">
| <PREDICATES: ":predicates">
| <FUNCTIONS: ":functions">
| <ACTION: ":action">
| <PARAMETERS: ":parameters">
| <PRECONDITION: ":precondition">
| <EFFECT: ":effect">
| <PREFERENCE: "preference">
| <WHEN: "when">
| <DURATIVE_ACTION: ":durative-action">
| <DURATION: ":duration">
| <CONDITION: ":condition">
| <DERIVED: ":derived">
| <PROBLEM: "problem">
| <P_DOMAIN: ":domain">
| <OBJECTS: ":objects">
| <INIT: ":init">
| <GOAL: ":goal">
| <METRIC: ":metric">
| <METHOD: ":method">
| <TASK: ":task">
| <ORDERED_SUBTASKS: ":ordered-subtasks">
| <ORDERED_TASKS: ":ordered-tasks">
| <TASKS: ":tasks">
| <SUBTASKS: ":subtasks">
| <ORDERING: ":ordering">
| <DURATIVE_METHOD: ":durative-method">
}

   
<DEFAULT> TOKEN : {
<STRIPS: ":strips">
| <TYPING: ":typing">
| <NEGATIVE_PRECONDITIONS: ":negative-preconditions">
| <DISJUNCTIVE_PRECONDITIONS: ":disjunctive-preconditions">
| <EQUALITY: ":equality">
| <EXISTENTIAL_PRECONDITIONS: ":existential-preconditions">
| <UNIVERSAL_PRECONDITIONS: ":universal-preconditions">
| <QUANTIFIED_PRECONDITIONS: ":quantified-preconditions">
| <CONDITIONAL_EFFECTS: ":conditional-effects">
| <ACTION_COSTS: ":action-costs">
| <FLUENTS: ":fluents">
| <NUMERIC_FLUENTS: ":numeric-fluents">
| <OBJECT_FLUENTS: ":object-fluents">
| <GOAL_UTILITIES: ":goal-utilities">
| <ADL: ":adl">
| <DURATIVE_ACTIONS: ":durative-actions">
| <DERIVED_PREDICATES: ":derived-predicates">
| <TIMED_INITIAL_LITERALS: ":timed-initial-literals">
| <PREFERENCES: ":preferences">
| <CONSTRAINTS: ":constraints">
| <CONTINUS_EFFECTS: ":continus-effects">
| <DURATION_INEQUALITIES: ":duration-inequalities">
| <HIERARCHY: ":hierarchy">
| <HTN: ":htn">
| <METHOD_PRECONDITIONS: ":method-preconditions">
| <METHOD_CONSTRAINTS: ":method-constraints">
}

   
<DEFAULT> TOKEN : {
<GREAT: ">">
| <LESS: "<">
| <GEQUAL: ">=">
| <LEQUAL: "<=">
| <EQUAL: "=">
}

   
<DEFAULT> TOKEN : {
<MUL: "*">
| <DIV: "/">
| <ADD: "+">
| <SUB: "-">
}

   
<DEFAULT> TOKEN : {
<ASSIGN: "assign">
| <SCALE_UP: "scale-up">
| <SCALE_DOWN: "scale-down">
| <INCREASE: "increase">
| <DECREASE: "decrease">
}

   
<DEFAULT> TOKEN : {
<OR: "or">
| <AND: "and">
| <IMPLY: "imply">
| <NOT: "not">
| <FORALL: "forall">
| <EXISTS: "exists">
}

   
<DEFAULT> TOKEN : {
<ALWAYS: "always">
| <SOMETIME: "sometime">
| <WITHIN: "within">
| <AT_MOST_ONCE: "at-most-once">
| <SOMETIME_AFTER: "sometime-after">
| <SOMETIME_BEFORE: "sometime-before">
| <ALWAYS_WITHIN: "always-within">
| <HOLD_DURING: "hold-during">
| <HOLD_AFTER: "hold-after">
| <HOLD_BEFORE: "hold-before">
| <HOLD_BETWEEN: "hold-between">
| <AT: "at">
| <START: "start">
| <END: "end">
| <OVER: "over">
| <ALL: "all">
| <TOTAL_TIME: "total-time">
| <TOTAL_COST: "total-cost">
| <MAXIMIZE: "maximize">
| <MINIMIZE: "minimize">
| <IS_VIOLATED: "is-violated">
}

   
<DEFAULT> TOKEN : {
<VAR_DURATION: "?duration">
| <CONTINUOUS_VARIABLE: "#t">
| <F_DURATION: "duration">
}

   
<DEFAULT> TOKEN : {
<NUMBER_TYPE: "number">
| <OBJECT_TYPE: "object">
}

   
<DEFAULT> TOKEN : {
<VARIABLE_SYMBOL: "?" <LETTER> (<LETTER> | <SEPARATOR> | <DIGIT>)*>
| <SYMBOL: <LETTER> (<LETTER> | "-" | <DIGIT>)*>
| <NUMBER: (<DIGIT>)+ ("." (<DIGIT>)*)?>
| <#DIGIT: ["0"-"9"]>
| <#LETTER: ["a"-"z","A"-"Z","_"]>
| <#SEPARATOR: ["_","-"]>
}

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

NON-TERMINALS

right_bracket ::= <RIGHT_BRACKET>
left_bracket ::= <LEFT_BRACKET>
domain ::= <LEFT_BRACKET> <DEFINE> <LEFT_BRACKET> <DOMAIN> domain_name right_bracket ( require_def )? ( type_def )? ( constants_def )? ( predicates_def )? ( functions_def )? ( pddl_const )? ( structure_def )+ right_bracket <EOF>
domain_and_problem ::= <LEFT_BRACKET> <DEFINE> <LEFT_BRACKET> <DOMAIN> domain_name <RIGHT_BRACKET> ( require_def )? ( type_def )? ( constants_def )? ( predicates_def )? ( functions_def )? ( pddl_const )? ( structure_def )+ <RIGHT_BRACKET> problem
require_def ::= left_bracket <REQUIREMENTS> ( require_key )+ right_bracket
require_key ::= ( <STRIPS> | <TYPING> | <NEGATIVE_PRECONDITIONS> | <DISJUNCTIVE_PRECONDITIONS> | <EQUALITY> | <EXISTENTIAL_PRECONDITIONS> | <UNIVERSAL_PRECONDITIONS> | <QUANTIFIED_PRECONDITIONS> | <CONDITIONAL_EFFECTS> | <FLUENTS> | <NUMERIC_FLUENTS> | <OBJECT_FLUENTS> | <GOAL_UTILITIES> | <ADL> | <ACTION_COSTS> | <DURATIVE_ACTIONS> | <DERIVED_PREDICATES> | <TIMED_INITIAL_LITERALS> | <PREFERENCES> | <CONSTRAINTS> | <CONTINUS_EFFECTS> | <DURATION_INEQUALITIES> | <HIERARCHY> | <METHOD_PRECONDITIONS> | <METHOD_CONSTRAINTS> )
type_def ::= left_bracket <TYPES> typed_list right_bracket
typed_list ::= ( left_bracket right_bracket | ( primitive_type )* ( <SUB> type typed_list )? | ( constant )* ( <SUB> type typed_list )? | ( variable )* ( <SUB> type typed_list )? )
type ::= ( left_bracket <EITHER> ( primitive_type )+ right_bracket | primitive_type )
primitive_type ::= ( <OBJECT_TYPE> | <NUMBER_TYPE> | <SYMBOL> )
constants_def ::= left_bracket <CONSTANTS> typed_list right_bracket
constant ::= ( <SYMBOL> | <AT> | <END> | <START> | <OVER> )
predicates_def ::= left_bracket <PREDICATES> ( atomic_formula_skeleton )+ right_bracket
comp_task_def ::= <LEFT_BRACKET> <TASK> task_def <RIGHT_BRACKET>
task_def ::= task_symbol <PARAMETERS> left_bracket typed_list <RIGHT_BRACKET>
task_symbol ::= <SYMBOL>
atomic_formula_skeleton ::= <LEFT_BRACKET> predicate typed_list <RIGHT_BRACKET>
predicate ::= ( <SYMBOL> | <AT> | <END> | <START> | <OVER> )
variable ::= <VARIABLE_SYMBOL>
functions_def ::= left_bracket <FUNCTIONS> function_typed_list right_bracket
atomic_function_skeleton ::= <LEFT_BRACKET> functor typed_list <RIGHT_BRACKET>
functor ::= ( <SYMBOL> | <TOTAL_COST> | <AT> | <END> | <START> | <OVER> )
function_typed_list ::= ( atomic_function_skeleton )* ( <SUB> function_type function_typed_list )?
function_type ::= <NUMBER_TYPE>
| type
con_gd ::= ( and_con_gd | forall_con_gd | at_end_con_gd | always_con_gd | sometime_con_gd | within_con_gd | at_most_once_con_gd | sometime_after_con_gd | sometime_before_con_gd | always_within_con_gd | hold_during_con_gd | hold_after_con_gd )
and_con_gd ::= <LEFT_BRACKET> <AND> ( con_gd )* <RIGHT_BRACKET>
forall_con_gd ::= <LEFT_BRACKET> <FORALL> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> con_gd <RIGHT_BRACKET>
at_end_con_gd ::= <LEFT_BRACKET> <AT> <END> gd <RIGHT_BRACKET>
always_con_gd ::= <LEFT_BRACKET> <ALWAYS> gd <RIGHT_BRACKET>
sometime_con_gd ::= <LEFT_BRACKET> <SOMETIME> gd <RIGHT_BRACKET>
within_con_gd ::= <LEFT_BRACKET> <WITHIN> number gd <RIGHT_BRACKET>
at_most_once_con_gd ::= <LEFT_BRACKET> <AT_MOST_ONCE> gd <RIGHT_BRACKET>
sometime_after_con_gd ::= <LEFT_BRACKET> <SOMETIME_AFTER> gd gd <RIGHT_BRACKET>
sometime_before_con_gd ::= <LEFT_BRACKET> <SOMETIME_BEFORE> gd gd <RIGHT_BRACKET>
always_within_con_gd ::= <LEFT_BRACKET> <ALWAYS_WITHIN> number gd gd <RIGHT_BRACKET>
hold_during_con_gd ::= <LEFT_BRACKET> <HOLD_DURING> number number gd <RIGHT_BRACKET>
hold_after_con_gd ::= <LEFT_BRACKET> <HOLD_AFTER> number gd <RIGHT_BRACKET>
gd ::= ( atomic_formula | and_gd | or_gd | not_gd | imply_gd | exists_gd | forall_gd | equal_gd | f_comp )
equal_gd ::= ( not_equal_atomic_formula | equal_atomic_formula )
not_equal_atomic_formula ::= <LEFT_BRACKET> <NOT> equal_gd <RIGHT_BRACKET>
equal_atomic_formula ::= <LEFT_BRACKET> <EQUAL> term term <RIGHT_BRACKET>
and_gd ::= <LEFT_BRACKET> <AND> ( gd )* <RIGHT_BRACKET>
or_gd ::= <LEFT_BRACKET> <OR> ( gd )* <RIGHT_BRACKET>
not_gd ::= <LEFT_BRACKET> <NOT> gd <RIGHT_BRACKET>
imply_gd ::= <LEFT_BRACKET> <IMPLY> gd gd <RIGHT_BRACKET>
exists_gd ::= <LEFT_BRACKET> <EXISTS> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> gd <RIGHT_BRACKET>
forall_gd ::= <LEFT_BRACKET> <FORALL> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> gd <RIGHT_BRACKET>
atomic_formula ::= <LEFT_BRACKET> predicate ( ( constant )* | ( term )* ) <RIGHT_BRACKET>
term ::= ( constant | variable )
literal ::= ( atomic_formula | not_atomic_formula )
not_atomic_formula ::= <LEFT_BRACKET> <NOT> atomic_formula <RIGHT_BRACKET>
f_comp ::= binary_comp
binary_comp ::= ( greater_comp | less_comp | greater_equal_comp | less_equal_comp | equal_comp )
greater_comp ::= <LEFT_BRACKET> <GREAT> f_exp f_exp <RIGHT_BRACKET>
greater_equal_comp ::= <LEFT_BRACKET> <GEQUAL> f_exp f_exp <RIGHT_BRACKET>
less_equal_comp ::= <LEFT_BRACKET> <LEQUAL> f_exp f_exp <RIGHT_BRACKET>
less_comp ::= <LEFT_BRACKET> <LESS> f_exp f_exp <RIGHT_BRACKET>
equal_comp ::= <LEFT_BRACKET> <EQUAL> f_exp f_exp <RIGHT_BRACKET>
f_exp ::= ( number | op | f_head )
number ::= <NUMBER>
op ::= ( binary_operation | unary_op )
binary_operation ::= ( add_op | substract_op | multiply_op | divide_op )
add_op ::= <LEFT_BRACKET> <ADD> f_exp f_exp <RIGHT_BRACKET>
substract_op ::= <LEFT_BRACKET> <SUB> f_exp f_exp <RIGHT_BRACKET>
multiply_op ::= <LEFT_BRACKET> <MUL> f_exp f_exp <RIGHT_BRACKET>
divide_op ::= <LEFT_BRACKET> <DIV> f_exp f_exp <RIGHT_BRACKET>
unary_op ::= <LEFT_BRACKET> <SUB> f_exp <RIGHT_BRACKET>
f_head ::= <LEFT_BRACKET> functor ( term )* <RIGHT_BRACKET>
| functor
structure_def ::= ( action_def | durative_action_def | derived_def | htn_action_def | comp_task_def | method_def | durative_method_def )
method_def ::= left_bracket <METHOD> method_name <PARAMETERS> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> <TASK> task_formula ( <PRECONDITION> pre_gd )? task_network right_bracket
durative_method_def ::= left_bracket <DURATIVE_METHOD> method_name <PARAMETERS> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> <TASK> task_formula ( <DURATION> method_duration_constraint )? ( <CONDITION> da_gd )? durative_task_network right_bracket
task_network ::= ( <TASKS> | <SUBTASKS> ) subtask_def ( <ORDERING> htn_ordering_constraints_def )? ( <CONSTRAINTS> htn_constraints_def )?
| ( <ORDERED_TASKS> | <ORDERED_SUBTASKS> ) subtask_def ( <CONSTRAINTS> htn_constraints_def )?
durative_task_network ::= ( <TASKS> | <SUBTASKS> ) subtask_def ( <ORDERING> durative_htn_ordering_constraints_def )? ( <CONSTRAINTS> htn_constraints_def )?
| ( <ORDERED_TASKS> | <ORDERED_SUBTASKS> ) subtask_def ( <CONSTRAINTS> htn_constraints_def )?
method_name ::= <SYMBOL>
subtask_def ::= ( subtask | and_subtask | <LEFT_BRACKET> <RIGHT_BRACKET> )
and_subtask ::= <LEFT_BRACKET> <AND> ( subtask )* <RIGHT_BRACKET>
subtask ::= ( <LEFT_BRACKET> task_id_symbol task_formula <RIGHT_BRACKET> | task_formula )
task_formula ::= <LEFT_BRACKET> task_symbol ( ( constant )* | ( term )* ) <RIGHT_BRACKET>
htn_ordering_constraints_def ::= ( empty_and | htn_ordering_constraint | and_ordering_constraints )
durative_htn_ordering_constraints_def ::= ( empty_and | durative_htn_ordering_constraint | durative_and_ordering_constraints )
and_ordering_constraints ::= <LEFT_BRACKET> <AND> ( htn_ordering_constraint )* <RIGHT_BRACKET>
durative_and_ordering_constraints ::= <LEFT_BRACKET> <AND> ( durative_htn_ordering_constraint )* <RIGHT_BRACKET>
htn_ordering_constraint ::= less_htn_ordering_constraint
durative_htn_ordering_constraint ::= ( less_htn_ordering_constraint | equal_htn_temporal_ordering_constraint | less_htn_temporal_ordering_constraint | less_or_equal_htn_temporal_ordering_constraint | great_htn_temporal_ordering_constraint | great_or_equal_htn_temporal_ordering_constraint | not_equal_htn_temporal_ordering_constraint )
less_htn_ordering_constraint ::= <LEFT_BRACKET> <LESS> task_id task_id <RIGHT_BRACKET>
equal_htn_temporal_ordering_constraint ::= <LEFT_BRACKET> <EQUAL> timed_task_id timed_task_id <RIGHT_BRACKET>
less_htn_temporal_ordering_constraint ::= <LEFT_BRACKET> <LESS> timed_task_id timed_task_id <RIGHT_BRACKET>
less_or_equal_htn_temporal_ordering_constraint ::= <LEFT_BRACKET> <LEQUAL> timed_task_id timed_task_id <RIGHT_BRACKET>
great_htn_temporal_ordering_constraint ::= <LEFT_BRACKET> <GREAT> timed_task_id timed_task_id <RIGHT_BRACKET>
great_or_equal_htn_temporal_ordering_constraint ::= <LEFT_BRACKET> <GEQUAL> timed_task_id timed_task_id <RIGHT_BRACKET>
not_equal_htn_temporal_ordering_constraint ::= <LEFT_BRACKET> <NOT> equal_htn_temporal_ordering_constraint <RIGHT_BRACKET>
task_id_symbol ::= <SYMBOL>
task_id ::= task_id_symbol
timed_task_id ::= ( start_task_id | end_task_id )
start_task_id ::= <LEFT_BRACKET> <START> task_id_symbol <RIGHT_BRACKET>
end_task_id ::= <LEFT_BRACKET> <END> task_id_symbol <RIGHT_BRACKET>
htn_constraints_def ::= ( empty_and | htn_constraint | and_htn_constraints )
and_htn_constraints ::= <LEFT_BRACKET> <AND> ( htn_constraint )+ <RIGHT_BRACKET>
htn_constraint ::= ( equal_atomic_formula | not_equal_atomic_formula | hold_before_htn_constraint | hold_after_htn_constraint | hold_between_htn_constraint | hold_during_htn_constraint | at_end_htn_constraint | at_start_htn_constraint | always_htn_constraint | at_most_one_htn_constraint | sometime_htn_constraint | sometime_before_htn_constraint | sometime_after_htn_constraint )
hold_before_htn_constraint ::= <LEFT_BRACKET> <HOLD_BEFORE> task_id gd <RIGHT_BRACKET>
hold_after_htn_constraint ::= <LEFT_BRACKET> <HOLD_AFTER> task_id effect <RIGHT_BRACKET>
hold_between_htn_constraint ::= <LEFT_BRACKET> <HOLD_BETWEEN> task_id task_id gd <RIGHT_BRACKET>
hold_during_htn_constraint ::= <LEFT_BRACKET> <HOLD_DURING> task_id task_id gd <RIGHT_BRACKET>
at_end_htn_constraint ::= <LEFT_BRACKET> <AT> <END> task_id effect <RIGHT_BRACKET>
at_start_htn_constraint ::= <LEFT_BRACKET> <AT> <START> task_id gd <RIGHT_BRACKET>
always_htn_constraint ::= <LEFT_BRACKET> <ALWAYS> task_id gd <RIGHT_BRACKET>
at_most_one_htn_constraint ::= <LEFT_BRACKET> <AT_MOST_ONCE> task_id gd <RIGHT_BRACKET>
sometime_htn_constraint ::= <LEFT_BRACKET> <SOMETIME> task_id gd <RIGHT_BRACKET>
sometime_before_htn_constraint ::= <LEFT_BRACKET> <SOMETIME_BEFORE> task_id gd <RIGHT_BRACKET>
sometime_after_htn_constraint ::= <LEFT_BRACKET> <SOMETIME_AFTER> task_id gd <RIGHT_BRACKET>
derived_def ::= left_bracket <DERIVED> atomic_formula_skeleton gd right_bracket
action_def ::= left_bracket <ACTION> action_name <PARAMETERS> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> <PRECONDITION> pre_gd <EFFECT> effect right_bracket
htn_action_def ::= left_bracket <ACTION> action_name <PARAMETERS> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> ( <PRECONDITION> pre_gd )? ( <EFFECT> effect )? right_bracket
action_name ::= <SYMBOL>
pre_gd ::= ( pref_gd | and_pre_gd | forall_pre_gd | empty_or | gd )
empty_or ::= <LEFT_BRACKET> <RIGHT_BRACKET>
empty_and ::= <LEFT_BRACKET> <RIGHT_BRACKET>
and_pre_gd ::= <LEFT_BRACKET> <AND> ( pre_gd )* <RIGHT_BRACKET>
forall_pre_gd ::= <LEFT_BRACKET> <FORALL> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> pre_gd <RIGHT_BRACKET>
pref_gd ::= <LEFT_BRACKET> <PREFERENCE> ( pref_name )? gd <RIGHT_BRACKET>
pref_name ::= <SYMBOL>
effect ::= ( empty_or | and_c_effect | c_effect )
and_c_effect ::= <LEFT_BRACKET> <AND> ( c_effect )* <RIGHT_BRACKET>
c_effect ::= ( forall_effect | when_con_effect | p_effect )
forall_effect ::= <LEFT_BRACKET> <FORALL> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> effect <RIGHT_BRACKET>
when_con_effect ::= <LEFT_BRACKET> <WHEN> gd cond_effect <RIGHT_BRACKET>
cond_effect ::= ( and_p_effect | p_effect )
and_p_effect ::= <LEFT_BRACKET> <AND> ( p_effect )* <RIGHT_BRACKET>
p_effect ::= ( assign_op | increase_total_cost | literal )
increase_total_cost ::= <LEFT_BRACKET> <INCREASE> total_cost numeric_term <RIGHT_BRACKET>
total_cost ::= <LEFT_BRACKET> <TOTAL_COST> <RIGHT_BRACKET>
numeric_term ::= ( f_head | number )
assign_op ::= ( assign | scale_up | scale_down | increase | decrease )
assign ::= <LEFT_BRACKET> <ASSIGN> f_head f_exp <RIGHT_BRACKET>
scale_up ::= <LEFT_BRACKET> <SCALE_UP> f_head f_exp <RIGHT_BRACKET>
scale_down ::= <LEFT_BRACKET> <SCALE_DOWN> f_head f_exp <RIGHT_BRACKET>
increase ::= <LEFT_BRACKET> <INCREASE> f_head f_exp <RIGHT_BRACKET>
decrease ::= <LEFT_BRACKET> <DECREASE> f_head f_exp <RIGHT_BRACKET>
durative_action_def ::= left_bracket <DURATIVE_ACTION> da_symbol <PARAMETERS> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> <DURATION> duration_constraint <CONDITION> da_gd <EFFECT> da_effect right_bracket
da_symbol ::= <SYMBOL>
duration_constraint ::= ( empty_or | and_simple_duration_constraint | simple_duration_constraint )
and_simple_duration_constraint ::= <LEFT_BRACKET> <AND> ( simple_duration_constraint )+ <RIGHT_BRACKET>
simple_duration_constraint ::= ( d_op | at_simple_duration_constraint )
at_simple_duration_constraint ::= ( at_start_simple_duration_constraint | at_end_simple_duration_constraint )
at_start_simple_duration_constraint ::= <LEFT_BRACKET> <AT> <START> simple_duration_constraint <RIGHT_BRACKET>
at_end_simple_duration_constraint ::= <LEFT_BRACKET> <AT> <END> simple_duration_constraint <RIGHT_BRACKET>
d_op ::= ( equal_d_op | gequal_d_op | lequal_d_op )
equal_d_op ::= <LEFT_BRACKET> <EQUAL> var_duration d_value <RIGHT_BRACKET>
gequal_d_op ::= <LEFT_BRACKET> <GEQUAL> var_duration d_value <RIGHT_BRACKET>
lequal_d_op ::= <LEFT_BRACKET> <LEQUAL> var_duration d_value <RIGHT_BRACKET>
var_duration ::= <VAR_DURATION>
d_value ::= ( number | f_exp )
method_duration_constraint ::= ( empty_or | simple_method_duration_constraint | and_simple_method_duration_constraint )
and_simple_method_duration_constraint ::= <LEFT_BRACKET> <AND> ( simple_method_duration_constraint )+ <RIGHT_BRACKET>
simple_method_duration_constraint ::= ( equal_method_duration_constraint | great_method_duration_constraint | great_or_equal_method_duration_constraint | less_method_duration_constraint | less_or_equal_method_duration_constraint | at_simple_duration_constraint )
equal_method_duration_constraint ::= <LEFT_BRACKET> <EQUAL> duration d_value <RIGHT_BRACKET>
great_method_duration_constraint ::= <LEFT_BRACKET> <GREAT> duration d_value <RIGHT_BRACKET>
great_or_equal_method_duration_constraint ::= <LEFT_BRACKET> <GEQUAL> duration d_value <RIGHT_BRACKET>
less_method_duration_constraint ::= <LEFT_BRACKET> <LESS> duration d_value <RIGHT_BRACKET>
less_or_equal_method_duration_constraint ::= <LEFT_BRACKET> <LEQUAL> duration d_value <RIGHT_BRACKET>
duration ::= ( var_duration | f_duration )
f_duration ::= <LEFT_BRACKET> <F_DURATION> task_id_symbol <RIGHT_BRACKET>
temporal_simple_method_duration_constraint ::= ( at_start_simple_method_duration_constraint | at_end_simple_method_duration_constraint )
at_start_simple_method_duration_constraint ::= <LEFT_BRACKET> <AT> <START> simple_duration_constraint <RIGHT_BRACKET>
at_end_simple_method_duration_constraint ::= <LEFT_BRACKET> <AT> <END> simple_duration_constraint <RIGHT_BRACKET>
da_gd ::= ( pref_timed_gd | and_da_gd | forall_da_gd )
forall_da_gd ::= <LEFT_BRACKET> <FORALL> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> da_gd <RIGHT_BRACKET>
and_da_gd ::= <LEFT_BRACKET> <AND> ( da_gd )* <RIGHT_BRACKET>
pref_timed_gd ::= ( timed_gd | named_pref_timed_gd )
named_pref_timed_gd ::= <LEFT_BRACKET> <PREFERENCE> ( pref_name )? timed_gd <RIGHT_BRACKET>
timed_gd ::= ( at_timed_gd | over_timed_gd )
over_timed_gd ::= <LEFT_BRACKET> <OVER> <ALL> gd <RIGHT_BRACKET>
at_timed_gd ::= ( at_start_timed_gd | at_end_timed_gd )
at_start_timed_gd ::= <LEFT_BRACKET> <AT> <START> gd <RIGHT_BRACKET>
at_end_timed_gd ::= <LEFT_BRACKET> <AT> <END> gd <RIGHT_BRACKET>
da_effect ::= ( empty_and | and_da_effect | timed_effect | forall_da_effect | when_da_effect | da_assign_op )
da_assign_op ::= ( da_assign | da_scale_up | da_scale_down | da_increase | da_decrease )
da_assign ::= <LEFT_BRACKET> <ASSIGN> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
da_scale_up ::= <LEFT_BRACKET> <SCALE_UP> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
da_scale_down ::= <LEFT_BRACKET> <SCALE_DOWN> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
da_increase ::= <LEFT_BRACKET> <INCREASE> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
da_decrease ::= <LEFT_BRACKET> <DECREASE> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
when_da_effect ::= <LEFT_BRACKET> <WHEN> da_gd da_effect <RIGHT_BRACKET>
forall_da_effect ::= <LEFT_BRACKET> <FORALL> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> da_effect <RIGHT_BRACKET>
and_da_effect ::= <LEFT_BRACKET> <AND> ( da_effect )* <RIGHT_BRACKET>
timed_effect ::= ( at_a_effect | assign_op_t )
at_f_assign_da ::= ( at_start_f_assign_da | at_end_f_assign_da )
at_start_f_assign_da ::= <LEFT_BRACKET> <AT> <START> f_assign_da <RIGHT_BRACKET>
at_end_f_assign_da ::= <LEFT_BRACKET> <AT> <END> f_assign_da <RIGHT_BRACKET>
at_a_effect ::= ( at_start_a_effect | at_end_a_effect )
a_effect ::= ( f_assign_da | literal | when_con_effect | forall_effect )
at_start_a_effect ::= <LEFT_BRACKET> <AT> <START> a_effect <RIGHT_BRACKET>
at_end_a_effect ::= <LEFT_BRACKET> <AT> <END> a_effect <RIGHT_BRACKET>
assign_op_t ::= ( increase_assign_op_t | decrease_assign_op_t )
increase_assign_op_t ::= <LEFT_BRACKET> <INCREASE> f_head f_exp_t <RIGHT_BRACKET>
decrease_assign_op_t ::= <LEFT_BRACKET> <DECREASE> f_head f_exp_t <RIGHT_BRACKET>
f_exp_t ::= ( <LEFT_BRACKET> <MUL> continuous_variable f_exp <RIGHT_BRACKET> | <LEFT_BRACKET> <MUL> f_exp continuous_variable <RIGHT_BRACKET> | continuous_variable )
continuous_variable ::= <CONTINUOUS_VARIABLE>
f_assign_da ::= ( da_assign | da_scale_up | da_scale_down | da_increase | da_decrease )
f_exp_da ::= ( da_op | var_duration | f_exp )
da_op ::= ( da_add_op | da_substract_op | da_multiply_op | da_divide_op )
da_add_op ::= <LEFT_BRACKET> <ADD> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
da_substract_op ::= <LEFT_BRACKET> <SUB> ( ( f_head ( f_exp_da )? ) | ( ( f_exp_da )? f_head ) ) <RIGHT_BRACKET>
da_multiply_op ::= <LEFT_BRACKET> <MUL> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
da_divide_op ::= <LEFT_BRACKET> <DIV> ( ( f_head f_exp_da ) | ( f_exp_da f_head ) ) <RIGHT_BRACKET>
problem ::= ( htn_problem | pddl_problem )
pddl_problem ::= <LEFT_BRACKET> <DEFINE> <LEFT_BRACKET> <PROBLEM> problem_name <RIGHT_BRACKET> <LEFT_BRACKET> <P_DOMAIN> domain_problem_name <RIGHT_BRACKET> ( require_def )? ( object_declaration )? init goal ( pddl_const )? ( metric_spec )? <RIGHT_BRACKET> <EOF>
htn_problem ::= <LEFT_BRACKET> <DEFINE> <LEFT_BRACKET> <PROBLEM> problem_name <RIGHT_BRACKET> <LEFT_BRACKET> <P_DOMAIN> domain_problem_name <RIGHT_BRACKET> ( require_def )? ( object_declaration )? <LEFT_BRACKET> <HTN> ( <PARAMETERS> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> )? ( task_network | durative_task_network ) <RIGHT_BRACKET> init ( goal )? ( metric_spec )? <RIGHT_BRACKET> <EOF>
problem_name ::= <SYMBOL>
domain_problem_name ::= <SYMBOL>
domain_name ::= <SYMBOL>
object_declaration ::= left_bracket <OBJECTS> typed_list right_bracket
init ::= left_bracket <INIT> ( init_el )* right_bracket
init_el ::= ( timed_literal | literal | equal_init_el )
equal_init_el ::= <LEFT_BRACKET> <EQUAL> constant_f_head number <RIGHT_BRACKET>
timed_literal ::= <LEFT_BRACKET> <AT> number literal <RIGHT_BRACKET>
goal ::= left_bracket <GOAL> pddl_goal right_bracket
pddl_goal ::= pre_gd
pddl_const ::= left_bracket <CONSTRAINTS> pref_con_gd right_bracket
pref_con_gd ::= ( and_pref_con_gd | forall_pref_con_gd | named_pref_con_gd | con_gd )
and_pref_con_gd ::= <LEFT_BRACKET> <AND> ( pref_con_gd )* <RIGHT_BRACKET>
named_pref_con_gd ::= <LEFT_BRACKET> <PREFERENCE> ( pref_name )? con_gd <RIGHT_BRACKET>
forall_pref_con_gd ::= <LEFT_BRACKET> <FORALL> <LEFT_BRACKET> typed_list <RIGHT_BRACKET> pref_con_gd <RIGHT_BRACKET>
metric_spec ::= ( maximize | minimize )
maximize ::= <LEFT_BRACKET> <METRIC> <MAXIMIZE> metric_f_exp <RIGHT_BRACKET>
minimize ::= <LEFT_BRACKET> <METRIC> <MINIMIZE> metric_f_exp <RIGHT_BRACKET>
metric_f_exp ::= ( op_metric_f_exp | number | constant_f_head | total_time | violated_pref_exp )
violated_pref_exp ::= <LEFT_BRACKET> <IS_VIOLATED> pref_name <RIGHT_BRACKET>
constant_f_head ::= <LEFT_BRACKET> functor ( constant )* <RIGHT_BRACKET>
total_time ::= ( <LEFT_BRACKET> <TOTAL_TIME> <RIGHT_BRACKET> | <TOTAL_TIME> )
op_metric_f_exp ::= ( add_op_metric_f_exp | substract_op_metric_f_exp | multi_op_metric_f_exp | div_op_metric_f_exp )
add_op_metric_f_exp ::= <LEFT_BRACKET> <ADD> metric_f_exp ( metric_f_exp )+ <RIGHT_BRACKET>
substract_op_metric_f_exp ::= <LEFT_BRACKET> <SUB> metric_f_exp ( metric_f_exp )? <RIGHT_BRACKET>
div_op_metric_f_exp ::= <LEFT_BRACKET> <DIV> metric_f_exp metric_f_exp <RIGHT_BRACKET>
multi_op_metric_f_exp ::= <LEFT_BRACKET> <MUL> metric_f_exp ( metric_f_exp )+ <RIGHT_BRACKET>