]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/text/txtLexer.mll
- we completed the text parser fixing the syntactic shortcuts
[helm.git] / helm / software / lambda-delta / text / txtLexer.mll
index 6a53d828f5b08172ceb7fbef405c31ff30cba7cc..d4262971322634253d64a22aea0b3ffac0d9055d 100644 (file)
@@ -38,25 +38,34 @@ 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 }
+   | "\\require" { out "REQUIRE"; P.REQUIRE }
+   | "\\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       }
+   | "~"         { out "TE"; P.TE           }
+   | "->"        { out "WTO"; P.WTO         }
+   | "=>"        { out "STO"; P.STO         }
+   | eof         { out "EOF"; P.EOF         }