)
| _ -> raise Stream.Failure
)
-
-(*
-(* This hand-written parser looks for "job <name>" before a statement. *)
-let optjob =
- Gram.Entry.of_parser "optjob"
- (fun stream ->
- let info, name =
- match Stream.npeek 2 stream with
- | [ LIDENT "job", info; STRING (_,name), _ ] ->
- Stream.junk stream;
- Stream.junk stream;
- info, name
- | (_, info) :: _ ->
- (* Job is unnamed so generate a unique internal name. *)
- info, unique_job_name ()
- | _ -> assert false in
- let _loc = Gram.token_location info in
- <:expr< $str:name$ >>
- )
-*)
;;
EXTEND Gram