diff options
| author | Emilio Jesus Gallego Arias | 2019-11-21 15:38:39 +0100 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-11-21 15:38:39 +0100 |
| commit | d016f69818b30b75d186fb14f440b93b0518fc66 (patch) | |
| tree | 32cd948273f79a2c01ad27b4ed0244ea60d7e2f9 /parsing | |
| parent | b680b06b31c27751a7d551d95839aea38f7fbea1 (diff) | |
[coq] Untabify the whole ML codebase.
We also remove trailing whitespace.
Script used:
```bash
for i in `find . -name '*.ml' -or -name '*.mli' -or -name '*.mlg'`; do expand -i "$i" | sponge "$i"; sed -e's/[[:space:]]*$//' -i.bak "$i"; done
```
Diffstat (limited to 'parsing')
| -rw-r--r-- | parsing/cLexer.ml | 6 | ||||
| -rw-r--r-- | parsing/g_constr.mlg | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/parsing/cLexer.ml b/parsing/cLexer.ml index 7f0d768d3f..4611d64665 100644 --- a/parsing/cLexer.ml +++ b/parsing/cLexer.ml @@ -195,14 +195,14 @@ let lookup_utf8_tail loc c cs = match Stream.npeek 3 cs with | [_;c2;c3] -> check_utf8_trailing_byte loc cs c2; - check_utf8_trailing_byte loc cs c3; + check_utf8_trailing_byte loc cs c3; 3, (c1 land 0x0F) lsl 12 + (Char.code c2 land 0x3F) lsl 6 + (Char.code c3 land 0x3F) | _ -> error_utf8 loc cs else match Stream.npeek 4 cs with | [_;c2;c3;c4] -> check_utf8_trailing_byte loc cs c2; - check_utf8_trailing_byte loc cs c3; + check_utf8_trailing_byte loc cs c3; check_utf8_trailing_byte loc cs c4; 4, (c1 land 0x07) lsl 18 + (Char.code c2 land 0x3F) lsl 12 + (Char.code c3 land 0x3F) lsl 6 + (Char.code c4 land 0x3F) @@ -833,7 +833,7 @@ let func next_token ?loc cs = Stream.from (fun i -> let (tok, loc) = next_token !cur_loc cs in - cur_loc := after loc; + cur_loc := after loc; loct_add loct i loc; Some tok) in (ts, loct_func loct) diff --git a/parsing/g_constr.mlg b/parsing/g_constr.mlg index 1cd36d2135..af1e973261 100644 --- a/parsing/g_constr.mlg +++ b/parsing/g_constr.mlg @@ -60,12 +60,12 @@ let lpar_id_coloneq = match stream_nth 0 strm with | KEYWORD "(" -> (match stream_nth 1 strm with - | IDENT s -> + | IDENT s -> (match stream_nth 2 strm with | KEYWORD ":=" -> stream_njunk 3 strm; Names.Id.of_string s - | _ -> err ()) + | _ -> err ()) | _ -> err ()) | _ -> err ()) @@ -73,23 +73,23 @@ let ensure_fixannot = Pcoq.Entry.of_parser "check_fixannot" (fun _ strm -> match stream_nth 0 strm with - | KEYWORD "{" -> - (match stream_nth 1 strm with + | KEYWORD "{" -> + (match stream_nth 1 strm with | IDENT ("wf"|"struct"|"measure") -> () - | _ -> err ()) - | _ -> err ()) + | _ -> err ()) + | _ -> err ()) let name_colon = Pcoq.Entry.of_parser "name_colon" (fun _ strm -> match stream_nth 0 strm with - | IDENT s -> + | IDENT s -> (match stream_nth 1 strm with | KEYWORD ":" -> stream_njunk 2 strm; Name (Names.Id.of_string s) | _ -> err ()) - | KEYWORD "_" -> + | KEYWORD "_" -> (match stream_nth 1 strm with | KEYWORD ":" -> stream_njunk 2 strm; @@ -186,7 +186,7 @@ GRAMMAR EXTEND Gram | "8" [ ] | "1" LEFTA [ c = operconstr; ".("; f = global; args = LIST0 appl_arg; ")" -> - { CAst.make ~loc @@ CApp((Some (List.length args+1), CAst.make @@ CRef (f,None)),args@[c,None]) } + { CAst.make ~loc @@ CApp((Some (List.length args+1), CAst.make @@ CRef (f,None)),args@[c,None]) } | c = operconstr; ".("; "@"; f = global; args = LIST0 (operconstr LEVEL "9"); ")" -> { CAst.make ~loc @@ CAppExpl((Some (List.length args+1),f,None),args@[c]) } @@ -453,7 +453,7 @@ GRAMMAR EXTEND Gram typeclass_constraint: [ [ "!" ; c = operconstr LEVEL "200" -> { (CAst.make ~loc Anonymous), true, c } | "{"; id = name; "}"; ":" ; expl = [ "!" -> { true } | -> { false } ] ; c = operconstr LEVEL "200" -> - { id, expl, c } + { id, expl, c } | iid = name_colon ; expl = [ "!" -> { true } | -> { false } ] ; c = operconstr LEVEL "200" -> { (CAst.make ~loc iid), expl, c } | c = operconstr LEVEL "200" -> |
