summaryrefslogtreecommitdiff
path: root/language
diff options
context:
space:
mode:
authorKathy Gray2013-08-01 15:15:17 +0100
committerKathy Gray2013-08-01 15:15:17 +0100
commit227367389122fb7e92cc359bb7e1d6aaba36ec69 (patch)
treeefd5d5d1092c19a9f3045e450dca0c512a591964 /language
parent663179dbfc247e22721fca1ab9caed35eb26c090 (diff)
More removal of ws from l2.ott, correction to parser, and adding finite-map as preliminary to some minor type checking (for environments)
Diffstat (limited to 'language')
-rw-r--r--language/l2.ott49
1 files changed, 1 insertions, 48 deletions
diff --git a/language/l2.ott b/language/l2.ott
index c998eb53..a20f14ee 100644
--- a/language/l2.ott
+++ b/language/l2.ott
@@ -51,49 +51,10 @@ embed
type text = string
-type l =
- | Unknown
- | Trans of string * l option
- | Range of Lexing.position * Lexing.position
+type l = Parse_ast.l
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
@@ -106,14 +67,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