]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/automath/autParser.mly
better debug pp
[helm.git] / helm / software / lambda-delta / automath / autParser.mly
index 2f7c06349a6589aba8b9789e170a9b198483430a..c772837b3fbfb77554ba859a7c3d435ded38830e 100644 (file)
@@ -32,7 +32,7 @@
    %token TYPE PROP DEF EB E PN EXIT
     
    %start book
-   %type <Aut.book> book   
+   %type <Aut.entity list> book   
 %%
    path: MINUS {} | FS {} ;
    oftype: CN {} | CM {} ;
       | term          { [$1]     }
       | term CM terms { $1 :: $3 }
    ;
-   item:
-      | PLUS IDENT                    { A.Section (Some $2)    }
-      | PLUS TIMES IDENT              { A.Section (Some $3)    }
-      | MINUS IDENT                   { A.Section None         }
-      | EXIT                          { A.Section None         }
-      | star                          { A.Context None         }
-      | qid star                      { A.Context (Some $1)    }
-      | IDENT DEF EB sc term          { A.Block ($1, $5)       }
-      | IDENT sc term DEF EB          { A.Block ($1, $3)       }
-      | OB IDENT oftype term CB       { A.Block ($2, $4)       }
-      | IDENT DEF PN sc term          { A.Decl ($1, $5)        }
-      | IDENT sc term DEF PN          { A.Decl ($1, $3)        }
-      | IDENT DEF expand term sc term { A.Def ($1, $6, $3, $4) }
-      | IDENT sc term DEF expand term { A.Def ($1, $3, $5, $6) }
+   entity:
+      | PLUS IDENT                    { A.Section (Some (true, $2))  }
+      | PLUS TIMES IDENT              { A.Section (Some (false, $3)) }
+      | MINUS IDENT                   { A.Section None               }
+      | EXIT                          { A.Section None               }
+      | star                          { A.Context None               }
+      | qid star                      { A.Context (Some $1)          }
+      | IDENT DEF EB sc term          { A.Block ($1, $5)             }
+      | IDENT sc term DEF EB          { A.Block ($1, $3)             }
+      | OB IDENT oftype term CB       { A.Block ($2, $4)             }
+      | IDENT DEF PN sc term          { A.Decl ($1, $5)              }
+      | IDENT sc term DEF PN          { A.Decl ($1, $3)              }
+      | IDENT DEF expand term sc term { A.Def ($1, $6, $3, $4)       }
+      | IDENT sc term DEF expand term { A.Def ($1, $3, $5, $6)       }
    ;
-   items:
-      |            { []       }
-      | item items { $1 :: $2 }
+   entities:
+      |                 { []       }
+      | entity entities { $1 :: $2 }
    ;
    book:
-      | items eof { $1 }
+      | entities eof { $1 }
    ;