Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
a3c2d96f
Commit
a3c2d96f
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2003-11-20 11:41:01 by szach] ported to new Validate arguments
Original author: szach Date: 2003-11-20 11:41:01+00:00
parent
f629ef68
Changes
2
Hide whitespace changes
Inline
Side-by-side
compile/compile.ml
View file @
a3c2d96f
...
@@ -53,7 +53,7 @@ and compile_aux env tail = function
...
@@ -53,7 +53,7 @@ and compile_aux env tail = function
|
Typed
.
Transform
(
e
,
brs
)
->
Transform
|
Typed
.
Transform
(
e
,
brs
)
->
Transform
(
compile
env
false
e
,
compile_branches
env
false
brs
)
(
compile
env
false
e
,
compile_branches
env
false
brs
)
|
Typed
.
Xtrans
(
e
,
brs
)
->
Xtrans
(
compile
env
false
e
,
compile_branches
env
false
brs
)
|
Typed
.
Xtrans
(
e
,
brs
)
->
Xtrans
(
compile
env
false
e
,
compile_branches
env
false
brs
)
|
Typed
.
Validate
(
e
,
sch
,
t
)
->
Validate
(
compile
env
tail
e
,
sch
,
t
)
|
Typed
.
Validate
(
e
,
k
,
sch
,
t
)
->
Validate
(
compile
env
tail
e
,
k
,
sch
,
t
)
|
Typed
.
RemoveField
(
e
,
l
)
->
RemoveField
(
compile
env
tail
e
,
l
)
|
Typed
.
RemoveField
(
e
,
l
)
->
RemoveField
(
compile
env
tail
e
,
l
)
|
Typed
.
Dot
(
e
,
l
)
->
Dot
(
compile
env
tail
e
,
l
)
|
Typed
.
Dot
(
e
,
l
)
->
Dot
(
compile
env
tail
e
,
l
)
|
Typed
.
Try
(
e
,
brs
)
->
Try
(
compile
env
false
e
,
compile_branches
env
tail
brs
)
|
Typed
.
Try
(
e
,
brs
)
->
Try
(
compile
env
false
e
,
compile_branches
env
tail
brs
)
...
...
compile/lambda.ml
View file @
a3c2d96f
...
@@ -6,6 +6,9 @@ type var_loc =
...
@@ -6,6 +6,9 @@ type var_loc =
|
Global
of
int
|
Global
of
int
|
Dummy
|
Dummy
type
schema_component_kind
=
[
`Type
|
`Element
|
`Attribute
|
`Attribute_group
|
`Model_group
]
option
type
expr
=
type
expr
=
|
Var
of
var_loc
|
Var
of
var_loc
|
ExtVar
of
Types
.
CompUnit
.
t
*
int
|
ExtVar
of
Types
.
CompUnit
.
t
*
int
...
@@ -23,7 +26,7 @@ type expr =
...
@@ -23,7 +26,7 @@ type expr =
|
Transform
of
expr
*
branches
|
Transform
of
expr
*
branches
|
Xtrans
of
expr
*
branches
|
Xtrans
of
expr
*
branches
|
Try
of
expr
*
branches
|
Try
of
expr
*
branches
|
Validate
of
expr
*
string
*
string
|
Validate
of
expr
*
schema_component_kind
*
string
*
string
|
RemoveField
of
expr
*
label
|
RemoveField
of
expr
*
label
|
Dot
of
expr
*
label
|
Dot
of
expr
*
label
|
UnaryOp
of
int
*
expr
|
UnaryOp
of
int
*
expr
...
@@ -128,7 +131,7 @@ module Put = struct
...
@@ -128,7 +131,7 @@ module Put = struct
bits
nbits
s
12
;
bits
nbits
s
12
;
expr
s
e
;
expr
s
e
;
branches
s
brs
branches
s
brs
|
Validate
(
e
,
sch
,
t
)
->
|
Validate
(
e
,
k
,
sch
,
t
)
->
assert
false
(* TODO:Need to store a pointer to the schema ... *)
assert
false
(* TODO:Need to store a pointer to the schema ... *)
|
RemoveField
(
e
,
l
)
->
|
RemoveField
(
e
,
l
)
->
bits
nbits
s
14
;
bits
nbits
s
14
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment