diff options
| author | Damien Doligez <damien.doligez-inria.fr> | 2014-03-31 17:58:53 +0000 |
|---|---|---|
| committer | Damien Doligez <damien.doligez-inria.fr> | 2014-03-31 17:58:53 +0000 |
| commit | 8643356b8542e0dcab358716f1e04d47b08b1a6d (patch) | |
| tree | e10cc5a03f7ead69a2d4ed563cbd021df5770ef2 /lex/parser.mly | |
| parent | cd1bf4b9fc898cee2f4886ed18ddf6271ec522e8 (diff) | |
| parent | 989ac0b2635443b9c0f183ee6343b663c854f4ea (diff) | |
| download | ocaml-ephemeron.tar.gz | |
merge with trunk at rev 14512ephemeron
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ephemeron@14514 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'lex/parser.mly')
| -rw-r--r-- | lex/parser.mly | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lex/parser.mly b/lex/parser.mly index b42cced949..f0742e38e4 100644 --- a/lex/parser.mly +++ b/lex/parser.mly @@ -49,7 +49,7 @@ let as_cset = function %token <string> Tstring %token <Syntax.location> Taction %token Trule Tparse Tparse_shortest Tand Tequal Tend Tor Tunderscore Teof - Tlbracket Trbracket + Tlbracket Trbracket Trefill %token Tstar Tmaybe Tplus Tlparen Trparen Tcaret Tdash Tlet Tas Tsharp %right Tas @@ -65,10 +65,11 @@ let as_cset = function %% lexer_definition: - header named_regexps Trule definition other_definitions header Tend + header named_regexps refill_handler Trule definition other_definitions header Tend { {header = $1; - entrypoints = $4 :: List.rev $5; - trailer = $6} } + refill_handler = $3; + entrypoints = $5 :: List.rev $6; + trailer = $7} } ; header: Taction @@ -89,6 +90,10 @@ other_definitions: | /*epsilon*/ { [] } ; +refill_handler: + | Trefill Taction { Some $2 } + | /*empty*/ { None } +; definition: Tident arguments Tequal Tparse entry { {name=$1 ; shortest=false ; args=$2 ; clauses=$5} } |
