This yacc grammar was generated on Thu Oct 05 10:28:30 CEST 2006 from the annotated Jacc grammar file HRL.grm.
ROOT
: HRL
;
HRL
: RuleSet
;
RuleSet
: Rule
| RuleSet Rule
;
Rule
: HornRule
;
HornRule
: Implication
;
Implication
: HEAD ':-' BODY
;
HEAD
: LITFORM
;
BODY
: CONDIT
;
CONDIT
: LITFORM
| QUANTIF
| CONJ
| DISJ
;
CONJ
: 'And' '(' CONDIT_star ')'
;
DISJ
: 'Or' '(' CONDIT_star ')'
;
QUANTIF
: 'Exists' Var_plus '(' CONDIT ')'
| 'Forall' Var_plus '(' CONDIT ')'
;
LITFORM
: Atom
| 'Neg' Atom
| 'Naf' Atom
| 'Naf' 'Neg' Atom
;
Atom
: 'Rel' '(' TERM_star ')'
| TERM '=' TERM
;
TERM
: 'Var'
| Con
| Expr
;
Expr
: 'Fun' '(' TERM_star ')'
;
CONDIT_star
: /* empty */
| CONDIT_plus
;
CONDIT_plus
: CONDIT
| CONDIT_plus CONDIT
;
TERM_star
: /* empty */
| TERM_plus
;
TERM_plus
: TERM
| TERM_plus TERM
;
Var_plus
: 'Var'
| Var_plus 'Var'
;
Con
: Data
| Ind
;
Data
: 'Value'
;
Ind
: 'Object'
;
Copyright © 2006 ILOG, Inc.; All Rights Reserved.