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
clean-and-itasks
clean-libraries
Commits
c0c6f47e
Commit
c0c6f47e
authored
May 22, 2008
by
Rinus Plasmeijer
Browse files
*** empty log message ***
parent
d0f03e1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/graph_copy/graph_to_sapl_string.icl
View file @
c0c6f47e
...
...
@@ -5,8 +5,8 @@ import StdStrictLists
import
graph_to_string_with_descriptors
//
import StdDebug
import
StdDebug
//import sapldebug
// Conversion of dynamic graph string to sapl code
// JMJ 2007
...
...
@@ -107,7 +107,7 @@ where
|
desc_type
==
'C'
&&
size
str
>
pos
+
4
&&
sifs
(
pos
+4
)
str
<
0
// shared node in constructor
=
makeBoxedConstr
pos
|
desc_type
==
'C'
&&
size
str
>
pos
+
4
&&
ds
.[
sifs
(
pos
+4
)
str
-
1
].[
0
]
==
's'
// String
=
readString
pos
=
readString
pos
|
desc_type
==
'C'
&&
size
str
>
pos
+
4
&&
ds
.[
sifs
(
pos
+4
)
str
-
1
].[
0
]
==
'a'
&&
sifs
(
pos
+12
)
str
<>
0
// unboxed array
#
typedes
=
ds
.[
sifs
(
pos
+12
)
str
-1
]
#
ssize
=
sifs
(
pos
+8
)
str
...
...
@@ -135,7 +135,10 @@ where
|
desc_type
==
's'
=
(
fst
(
decodeDyn
(
pos
-4
)),
newpos
)
// string case
=
(
fst
(
decodeDyn
(
pos
-4
)),
newpos
)
readString
pos
=
(
StringS
(
str
%(
pos
+12
,
pos
+12
+
sifs
(
pos
+8
)
str
-
1
)),
pos
+
12
+
4
*
((
sifs
(
pos
+8
)
str
-
1
)
/
4
+
1
))
readString
pos
=
//trace_n ("{DDD " +++ toString pos +++ "__" +++ toString (strsize )+++ "__" +++ toString (newpos ) +++ "}")
(
StringS
(
str
%(
pos
+12
,
pos
+12
+
sifs
(
pos
+8
)
str
-
1
)),
newpos
)
where
strsize
=
sifs
(
pos
+8
)
str
newpos
=
if
(
strsize
<>
0
)
(
pos
+
12
+
4
*
((
sifs
(
pos
+8
)
str
-
1
)
/
4
+
1
))
(
pos
+
12
)
makeUnboxedArray
typedes
size
pos
|
typedes
%(
0
,
0
)
==
"i"
||
typedes
%(
0
,
0
)
==
"b"
||
typedes
%(
0
,
0
)
==
"c"
...
...
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