src/HOL/TPTP/TPTP_Parser/tptp.yacc
changeset 48440 fce9d97a3258
parent 48218 d1ecc9cec531
child 48560 f5c05e51668f
equal deleted inserted replaced
48439:98c8b7542b72 48440:fce9d97a3258
   195   | atomic_system_word of string
   195   | atomic_system_word of string
   196 
   196 
   197 %pos int
   197 %pos int
   198 %eop EOF
   198 %eop EOF
   199 %noshift EOF
   199 %noshift EOF
   200 %arg (file_name) : string
   200 %arg (this_file_name) : string
   201 
   201 
   202 %nonassoc LET
   202 %nonassoc LET
   203 %nonassoc RPAREN
   203 %nonassoc RPAREN
   204 %nonassoc DUD
   204 %nonassoc DUD
   205 %right COMMA
   205 %right COMMA
   245                   | tff_annotated (( tff_annotated ))
   245                   | tff_annotated (( tff_annotated ))
   246                   | fof_annotated (( fof_annotated ))
   246                   | fof_annotated (( fof_annotated ))
   247                   | cnf_annotated (( cnf_annotated ))
   247                   | cnf_annotated (( cnf_annotated ))
   248 
   248 
   249 thf_annotated : THF LPAREN name COMMA formula_role COMMA thf_formula annotations RPAREN PERIOD ((
   249 thf_annotated : THF LPAREN name COMMA formula_role COMMA thf_formula annotations RPAREN PERIOD ((
   250   Annotated_Formula ((file_name, THFleft + 1, THFright + 1),
   250   Annotated_Formula ((this_file_name, THFleft + 1, THFright + 1),
   251    THF, name, formula_role, thf_formula, annotations)
   251    THF, name, formula_role, thf_formula, annotations)
   252 ))
   252 ))
   253 
   253 
   254 tff_annotated : TFF LPAREN name COMMA formula_role COMMA tff_formula annotations RPAREN PERIOD ((
   254 tff_annotated : TFF LPAREN name COMMA formula_role COMMA tff_formula annotations RPAREN PERIOD ((
   255   Annotated_Formula ((file_name, TFFleft + 1, TFFright + 1),
   255   Annotated_Formula ((this_file_name, TFFleft + 1, TFFright + 1),
   256    TFF, name, formula_role, tff_formula, annotations)
   256    TFF, name, formula_role, tff_formula, annotations)
   257 ))
   257 ))
   258 
   258 
   259 fof_annotated : FOF LPAREN name COMMA formula_role COMMA fof_formula annotations RPAREN PERIOD ((
   259 fof_annotated : FOF LPAREN name COMMA formula_role COMMA fof_formula annotations RPAREN PERIOD ((
   260   Annotated_Formula ((file_name, FOFleft + 1, FOFright + 1),
   260   Annotated_Formula ((this_file_name, FOFleft + 1, FOFright + 1),
   261    FOF, name, formula_role, fof_formula, annotations)
   261    FOF, name, formula_role, fof_formula, annotations)
   262 ))
   262 ))
   263 
   263 
   264 cnf_annotated : CNF LPAREN name COMMA formula_role COMMA cnf_formula annotations RPAREN PERIOD ((
   264 cnf_annotated : CNF LPAREN name COMMA formula_role COMMA cnf_formula annotations RPAREN PERIOD ((
   265   Annotated_Formula ((file_name, CNFleft + 1, CNFright + 1),
   265   Annotated_Formula ((this_file_name, CNFleft + 1, CNFright + 1),
   266    CNF, name, formula_role, cnf_formula, annotations)
   266    CNF, name, formula_role, cnf_formula, annotations)
   267 ))
   267 ))
   268 
   268 
   269 annotations : COMMA general_term optional_info (( SOME (general_term, optional_info) ))
   269 annotations : COMMA general_term optional_info (( SOME (general_term, optional_info) ))
   270             |                                  (( NONE ))
   270             |                                  (( NONE ))
   789               |                   (( [] ))
   789               |                   (( [] ))
   790 
   790 
   791 useful_info : general_list (( general_list ))
   791 useful_info : general_list (( general_list ))
   792 
   792 
   793 include_ : INCLUDE LPAREN file_name formula_selection RPAREN PERIOD ((
   793 include_ : INCLUDE LPAREN file_name formula_selection RPAREN PERIOD ((
   794   Include (file_name, formula_selection)
   794   Include ((this_file_name, INCLUDEleft + 1, INCLUDEright + 1),
       
   795     file_name, formula_selection)
   795 ))
   796 ))
   796 
   797 
   797 formula_selection : COMMA LBRKT name_list RBRKT   (( name_list  ))
   798 formula_selection : COMMA LBRKT name_list RBRKT   (( name_list  ))
   798                   |                               (( [] ))
   799                   |                               (( [] ))
   799 
   800