diff options
| author | Pierre-Marie Pédrot | 2020-03-03 10:53:00 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-03-03 10:53:00 +0100 |
| commit | 18aa9ca60ec9b3d1712276ec0c615dfe54c1a251 (patch) | |
| tree | 4858ae67d49347ee4d48fc9b1fa32e72372c72ce /plugins/ltac/extraargs.mlg | |
| parent | 650b98cc6dcdeef1090320cc8dfb027894788e82 (diff) | |
| parent | 7ebcbc1cecca87619aa4b01606021c29c5d1f0a2 (diff) | |
Merge PR #11695: Refactor lookaheads
Reviewed-by: herbelin
Reviewed-by: ppedrot
Diffstat (limited to 'plugins/ltac/extraargs.mlg')
| -rw-r--r-- | plugins/ltac/extraargs.mlg | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/plugins/ltac/extraargs.mlg b/plugins/ltac/extraargs.mlg index 5835d75c79..f97c291c79 100644 --- a/plugins/ltac/extraargs.mlg +++ b/plugins/ltac/extraargs.mlg @@ -330,18 +330,10 @@ END { let local_test_lpar_id_colon = - let err () = raise Stream.Failure in - Pcoq.Entry.of_parser "lpar_id_colon" - (fun _ strm -> - match Util.stream_nth 0 strm with - | Tok.KEYWORD "(" -> - (match Util.stream_nth 1 strm with - | Tok.IDENT _ -> - (match Util.stream_nth 2 strm with - | Tok.KEYWORD ":" -> () - | _ -> err ()) - | _ -> err ()) - | _ -> err ()) + let open Pcoq.Lookahead in + to_entry "lpar_id_colon" begin + lk_kw "(" >> lk_ident >> lk_kw ":" + end let pr_lpar_id_colon _ _ _ _ = mt () |
