- | OPEN ID { Some (T.Section (Some $2)) }
- | CLOSE { Some (T.Section None) }
- | GLOBAL comment ID CN term { Some (T.Global (false, $3, $2, $5)) }
- | GLOBAL comment ID EQ term { Some (T.Global (true, $3, $2, $5)) }
- | GLOBAL comment ID EQ term CN term { Some (T.Global (true, $3, $2, T.Cast ($7, $5))) }
- | EOF { None }
- ;
- entry:
+ | GRAPH ID
+ { Some (T.Graph $2) }
+ | decl comment ID CN term
+ { Some (T.Entity ($1, $3, $2, $5)) }
+ | def comment ID EQ term
+ { Some (T.Entity ($1, $3, $2, $5)) }
+ | def comment ID EQ term CN term
+ { Some (T.Entity ($1, $3, $2, T.Cast ($7, $5))) }
+ | GEN term
+ { Some (T.Generate [$2]) }
+ | GEN terms
+ { Some (T.Generate $2) }
+ | REQ ids
+ { Some (T.Require $2) }
+ | OPEN ID
+ { Some (T.Section (Some $2)) }
+ | CLOSE
+ { Some (T.Section None) }
+ | SORTS sorts
+ { Some (T.Sorts $2) }
+ | EOF
+ { None }
+ ;
+ start:
+ | GRAPH {} | decl {} | def {} | GEN {} |
+ | REQ {} | OPEN {} | CLOSE {} | SORTS {} | EOF {}
+ ;
+ entry: