[Omake] Merging 8877:9048 0.9.6.shell: src/env/omake_ir_ast.ml
Aleksey Nogin
nogin at cs.caltech.edu
Wed Apr 12 13:00:05 PDT 2006
Jason,
Some of the merging in src/env/omake_ir_ast.ml is far from obvious.
Attached is a patch of the merges I did so far - there are couple of
places that I am not sure of. I also attach the branch diff that I am
trying to merge in (for reference).
--
Aleksey Nogin
Home Page: http://nogin.org/
E-Mail: nogin at cs.caltech.edu (office), aleksey at nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200
-------------- next part --------------
Index: src/env/omake_ir_ast.ml
===================================================================
--- src/env/omake_ir_ast.ml (revision 9063)
+++ src/env/omake_ir_ast.ml (working copy)
@@ -4,7 +4,7 @@
* ----------------------------------------------------------------
*
* @begin[license]
- * Copyright (C) 2003 Jason Hickey, Caltech
+ * Copyright (C) 2003-2006 Mojave Group, Caltech
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -1585,6 +1585,7 @@
| Omake_ast.StringExp (s, _) ->
Buffer.add_string buf s
| Omake_ast.QuoteExp (el, _)
+ | Omake_ast.QuoteStringExp (_, el, _)
| Omake_ast.SequenceExp (el, _) ->
collect_exp_list el
| Omake_ast.ApplyExp (_, _, _, _, loc)
@@ -1639,6 +1640,7 @@
Buffer.add_string buf s;
literal
| Omake_ast.QuoteExp (el, _)
+ | Omake_ast.QuoteStringExp (_, el, _)
| Omake_ast.SequenceExp (el, _) ->
collect_exp_list literal el
| Omake_ast.ApplyExp (_, _, _, _, loc)
@@ -1712,6 +1714,8 @@
genv, ConstString (loc, s)
| Omake_ast.QuoteExp (el, loc) ->
build_quote_string genv senv cenv el pos loc
+ | Omake_ast.QuoteStringExp (c, el, loc) ->
+ build_quote_string_string genv senv cenv c el pos loc
| Omake_ast.SequenceExp ([e], _) ->
build_string genv senv cenv e pos
| Omake_ast.SequenceExp (el, loc) ->
@@ -1791,6 +1795,11 @@
let genv, args = build_sequence_string_aux genv senv cenv el pos loc in
genv, QuoteString (loc, args)
+and build_quote_string_string genv senv cenv c el pos loc =
+ let pos = string_pos "build_quote_string_string" pos in
+ let genv, args = build_sequence_string_aux genv senv cenv el pos loc in
+ genv, QuoteStringString (loc, c, args)
+
and build_sequence_string_aux genv senv cenv el pos loc =
let pos = string_pos "build_sequence_string_aux" pos in
let buf = Buffer.create 32 in
@@ -1843,6 +1852,7 @@
| ArrayString _
| ArrayOfString _
| QuoteString _
+ | QuoteStringString _
| CasesString _
| ThisString _ ->
let args = flush_buffer buf_opt args in
@@ -2003,6 +2013,8 @@
| Omake_ast.QuoteExp (s, loc) ->
let genv, s = build_string genv senv cenv e pos in
genv, senv, StringExp (loc, QuoteString (loc, [s])), ValValue
+ | Omake_ast.QuoteStringExp (_, _, loc) ->
+ genv, senv, raise (Invalid_argument "Aleksey: have not idea what goes here"), ValValue
| Omake_ast.SequenceExp ([e], _)
| Omake_ast.BodyExp ([e], _) ->
build_exp genv senv cenv result e
-------------- next part --------------
Index: omake_ir_ast.ml
===================================================================
--- omake_ir_ast.ml (revision 8877)
+++ omake_ir_ast.ml (revision 9048)
@@ -246,6 +246,7 @@
| Omake_ast.StringExp (s, _) ->
Buffer.add_string buf s
| Omake_ast.QuoteExp (el, _)
+ | Omake_ast.QuoteStringExp (_, el, _)
| Omake_ast.SequenceExp (el, _) ->
collect_exp_list el
| Omake_ast.ApplyExp (_, _, _, loc)
@@ -289,6 +290,8 @@
ConstString (loc, s)
| Omake_ast.QuoteExp (el, loc) ->
build_quote_string senv el pos loc
+ | Omake_ast.QuoteStringExp (c, el, loc) ->
+ build_quote_string_string senv c el pos loc
| Omake_ast.SequenceExp ([e], _) ->
build_string senv e pos
| Omake_ast.SequenceExp (el, loc) ->
@@ -341,6 +344,11 @@
let args = build_sequence_string_aux senv el pos loc in
QuoteString (loc, args)
+and build_quote_string_string senv c el pos loc =
+ let pos = string_pos "build_quote_string_string" pos in
+ let args = build_sequence_string_aux senv el pos loc in
+ QuoteStringString (loc, c, args)
+
and build_sequence_string_aux senv el pos loc =
let pos = string_pos "build_sequence_string_aux" pos in
let buf = Buffer.create 32 in
@@ -390,6 +398,7 @@
| ArrayString _
| ArrayOfString _
| QuoteString _
+ | QuoteStringString _
| ExpString _
| CasesString _
| ThisString _ ->
@@ -493,7 +502,8 @@
match e with
Omake_ast.NullExp loc
| Omake_ast.StringExp (_, loc)
- | Omake_ast.QuoteExp (_, loc) ->
+ | Omake_ast.QuoteExp (_, loc)
+ | Omake_ast.QuoteStringExp (_, _, loc) ->
senv, SequenceExp (loc, [])
| Omake_ast.SequenceExp ([e], _)
| Omake_ast.BodyExp ([e], _) ->
More information about the OMake-Devel
mailing list