aboutsummaryrefslogtreecommitdiffhomepage
path: root/grammar/coqpp_lex.mll
diff options
context:
space:
mode:
Diffstat (limited to 'grammar/coqpp_lex.mll')
-rw-r--r--grammar/coqpp_lex.mll4
1 files changed, 4 insertions, 0 deletions
diff --git a/grammar/coqpp_lex.mll b/grammar/coqpp_lex.mll
index f35766b16..6c6562c20 100644
--- a/grammar/coqpp_lex.mll
+++ b/grammar/coqpp_lex.mll
@@ -83,6 +83,7 @@ let alphanum = ['_' 'a'-'z' 'A'-'Z' '0'-'9' '\'']
let ident = letterlike alphanum*
let qualid = ident ('.' ident)*
let space = [' ' '\t' '\r']
+let number = [ '0'-'9' ]
rule extend = parse
| "(*" { start_comment (); comment lexbuf }
@@ -92,6 +93,8 @@ rule extend = parse
| "TACTIC" { TACTIC }
| "EXTEND" { EXTEND }
| "END" { END }
+| "DECLARE" { DECLARE }
+| "PLUGIN" { PLUGIN }
(** Camlp5 specific keywords *)
| "GLOBAL" { GLOBAL }
| "FIRST" { FIRST }
@@ -105,6 +108,7 @@ rule extend = parse
(** Standard *)
| ident { IDENT (Lexing.lexeme lexbuf) }
| qualid { QUALID (Lexing.lexeme lexbuf) }
+| number { INT (int_of_string (Lexing.lexeme lexbuf)) }
| space { extend lexbuf }
| '\"' { string lexbuf }
| '\n' { newline lexbuf; extend lexbuf }