summaryrefslogtreecommitdiff
path: root/language
diff options
context:
space:
mode:
authorGabriel Kerneis2013-08-01 12:22:42 +0100
committerGabriel Kerneis2013-08-01 12:22:42 +0100
commit8bb73c52a686a912887d349465d85241b6e8a312 (patch)
tree38fc2cb223202ee100ab6b71eea74188e3457ae3 /language
parent9fbac634d5986a3c067ba0dac29131a769461e2d (diff)
Lex and discard comments
Diffstat (limited to 'language')
-rw-r--r--language/l2_parse.ott42
1 files changed, 0 insertions, 42 deletions
diff --git a/language/l2_parse.ott b/language/l2_parse.ott
index 18d68a54..90fa544e 100644
--- a/language/l2_parse.ott
+++ b/language/l2_parse.ott
@@ -52,40 +52,6 @@ type 'a annot = l * 'a
exception Parse_error_locn of l * string
-type ml_comment =
- | Chars of string
- | Comment of ml_comment list
-
-type lex_skip =
- | Com of ml_comment
- | Ws of string
- | Nl
-
-type lex_skips = lex_skip list option
-
-let pp_lex_skips ppf sk =
- match sk with
- | None -> ()
- | Some(sks) ->
- List.iter
- (fun sk ->
- match sk with
- | Com(ml_comment) ->
- (* TODO: fix? *)
- Format.fprintf ppf "(**)"
- | Ws(r) ->
- Format.fprintf ppf "%s" r (*(Ulib.Text.to_string r)*)
- | Nl -> Format.fprintf ppf "\\n")
- sks
-
-let combine_lex_skips s1 s2 =
- match (s1,s2) with
- | (None,_) -> s2
- | (_,None) -> s1
- | (Some(s1),Some(s2)) -> Some(s2@s1)
-
-type terminal = lex_skips
-
}}
embed
@@ -98,14 +64,6 @@ type l =
| Trans of string * option l
| Range of num * num
-type lex_skip =
- | Com of string
- | Ws of string
- | Nl
-
-type lex_skips = option (list lex_skip)
-type terminal = lex_skips
-
val disjoint : forall 'a . set 'a -> set 'a -> bool
let disjoint s1 s2 =
let diff = s1 inter s2 in