]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/text/txtLexer.mll
- we implemented the hierarchy and sort names declaration in text parser
[helm.git] / helm / software / lambda-delta / text / txtLexer.mll
index 6a53d828f5b08172ceb7fbef405c31ff30cba7cc..05637286e81e73490e2845bcb4f9a5cf6719d05d 100644 (file)
@@ -38,25 +38,30 @@ and qstring = parse
    | BS QT { "\"" ^ qstring lexbuf                 } 
    | _     { Lexing.lexeme lexbuf ^ qstring lexbuf }
 and token = parse
-   | SPC        { token lexbuf                                          } 
-   | OC         { block_comment lexbuf; token lexbuf                    }
-   | ID         { out "ID"; P.ID (Lexing.lexeme lexbuf)                 }
-   | IX         { out "IX"; P.IX (int_of_string (Lexing.lexeme lexbuf)) }
-   | QT         { let s = qstring lexbuf in out "STR"; P.STR s          }
-   | "\\open"   { out "OPEN"; P.OPEN     } 
-   | "\\close"  { out "CLOSE"; P.CLOSE   }
-   | "\\global" { out "GLOBAL"; P.GLOBAL }
-   | "("        { out "OP"; P.OP         }
-   | ")"        { out "CP"; P.CP         }
-   | "["        { out "OB"; P.OB         }
-   | "]"        { out "CB"; P.CB         }
-   | "<"        { out "OA"; P.OA         }
-   | ">"        { out "CA"; P.CA         }
-   | "."        { out "FS"; P.FS         }   
-   | ":"        { out "CN"; P.CN         }   
-   | ","        { out "CM"; P.CM         }
-   | "="        { out "EQ"; P.EQ         }
-   | "*"        { out "STAR"; P.STAR     }
-   | "#"        { out "HASH"; P.HASH     }
-   | "+"        { out "PLUS"; P.PLUS     }
-   | eof        { out "EOF"; P.EOF       }
+   | SPC       { token lexbuf                                 } 
+   | OC        { block_comment lexbuf; token lexbuf           }
+   | ID as id  { out "ID"; P.ID id                            }
+   | IX as ix  { out "IX"; P.IX (int_of_string ix)            }
+   | QT        { let s = qstring lexbuf in out "STR"; P.STR s }
+   | "\\graph" { out "GRAPH"; P.GRAPH }
+   | "\\decl"  { out "DECL"; P.DECL   }
+   | "\\ax"    { out "AX"; P.AX       }
+   | "\\def"   { out "DEF"; P.DEF     }
+   | "\\th"    { out "TH"; P.TH       }
+   | "\\open"  { out "OPEN"; P.OPEN   } 
+   | "\\close" { out "CLOSE"; P.CLOSE }
+   | "\\sorts" { out "SORTS"; P.SORTS }
+   | "("       { out "OP"; P.OP       }
+   | ")"       { out "CP"; P.CP       }
+   | "["       { out "OB"; P.OB       }
+   | "]"       { out "CB"; P.CB       }
+   | "<"       { out "OA"; P.OA       }
+   | ">"       { out "CA"; P.CA       }
+   | "."       { out "FS"; P.FS       }   
+   | ":"       { out "CN"; P.CN       }   
+   | ","       { out "CM"; P.CM       }
+   | "="       { out "EQ"; P.EQ       }
+   | "*"       { out "STAR"; P.STAR   }
+   | "#"       { out "HASH"; P.HASH   }
+   | "+"       { out "PLUS"; P.PLUS   }
+   | eof       { out "EOF"; P.EOF     }