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
00fcca64
Commit
00fcca64
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2003-05-10 22:41:35 by cvscast] Empty log message
Original author: cvscast Date: 2003-05-10 22:43:28+00:00
parent
cb7bd7b8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
00fcca64
...
...
@@ -42,7 +42,7 @@ XWEBIFACE = $(WEBIFACE:.cmo=.cmx)
DEBUG
=
-g
PACKAGES
=
pxp-engine,pxp-lex-iso88591,
pxp-wlex-utf8,
wlexing,camlp4,num,cgi
PACKAGES
=
pxp-engine,pxp-lex-iso88591,wlexing,camlp4,num,cgi
OCAMLCP
=
ocamlc
OCAMLC
=
ocamlfind
$(OCAMLCP)
-package
$(PACKAGES)
OCAMLOPT
=
ocamlfind ocamlopt
-package
$(PACKAGES)
...
...
driver/examples.ml
View file @
00fcca64
...
...
@@ -96,11 +96,11 @@ type Woman = <woman name=String>[ Sons Daughters ];;
type Sons = <sons>[ Man* ];;
type Daughters = <daughters>[ Woman* ];;
let fun s
or
t (MPerson -> Man ; FPerson -> Woman)
let fun s
pli
t (MPerson -> Man ; FPerson -> Woman)
<person gender=g>[ <name>n <children>[(mc::MPerson | fc::FPerson)*]; _] ->
let tag = match g with
\"
F
\"
-> `woman |
\"
M
\"
-> `man in
let s = map mc with x -> s
or
t x in
let d = map fc with x -> s
or
t x in
let s = map mc with x -> s
pli
t x in
let d = map fc with x -> s
pli
t x in
<(tag) name=n>[ <sons>s <daughters>d ]
;;
...
...
@@ -129,7 +129,7 @@ let base : Person =
;;
s
or
t base;;
s
pli
t base;;
"
;
"note"
,
"
type Doc = <doc>Text;;
type Text = [ (Char | (Letter+ ' '* Note))* ];;
...
...
parser/wlexer.ml
View file @
00fcca64
...
...
@@ -113,12 +113,12 @@ let nb_classes = 34
let
lex_tables
=
{
Lexing
.
lex_base
=
"
\000\000\012\000\018\000\004\000\254\255\005\000\017\000\255\255
\
\251\255\250\255\255\255\0
16
\000\253\255\020\000\252\255\252\255
\
\251\255\00
7
\000\00
7
\000\253\255\247\255\246\255\0
32
\000\04
7
\000
\
\0
51
\000\0
30
\000\035\000\0
52
\000\250\255\0
55
\000\027\000\0
44
\000
\
\0
57
\000\04
1
\000\0
4
3\000\0
5
4\000\0
52
\000\249\255\248\255\07
2
\000
\
\08
0
\000\08
4
\000\09
7
\000\0
72
\000\10
1
\000\11
4
\000\1
18
\000\13
1
\000
\
\13
5
\000\1
48
\000\07
7
\000
"
;
\251\255\250\255\255\255\0
29
\000\253\255\020\000\252\255\252\255
\
\251\255\0
1
0\000\00
3
\000\253\255\247\255\246\255\0
19
\000\04
9
\000
\
\0
62
\000\0
18
\000\035\000\0
37
\000\250\255\0
60
\000\027\000\0
36
\000
\
\0
63
\000\0
2
4\000\03
0
\000\04
1
\000\0
41
\000\249\255\248\255\07
9
\000
\
\08
2
\000\08
6
\000\09
9
\000\0
65
\000\10
3
\000\11
6
\000\1
20
\000\13
3
\000
\
\13
7
\000\1
50
\000\07
1
\000
"
;
Lexing
.
lex_backtrk
=
"
\255\255\255\255\255\255\255\255\255\255\001\000\255\255\255\255
\
\255\255\255\255\255\255\005\000\255\255\255\255\255\255\255\255
\
...
...
@@ -138,51 +138,53 @@ let lex_tables = {
Lexing
.
lex_trans
=
"
\020\000\021\000\021\000\022\000\023\000\024\000\025\000\023\000
\
\026\000\027\000\005\000\006\000\015\000\029\000\030\000\031\000
\
\032\000\033\000\008\000\007\000\012\000\034\000\013\000\006\000
\
\007\000\035\000\013\000\036\000\033\000\017\000\037\000\007\000
\
\037\000\004\000\014\000\050\000\043\000\018\000\039\000\040\000
\
\040\000\009\000\019\000\009\000\019\000\009\000\004\000\004\000
\
\010\000\011\000\010\000\047\000\047\000\047\000\047\000\044\000
\
\044\000\044\000\044\000\009\000\048\000\009\000\009\000\047\000
\
\045\000\009\000\009\000\044\000\009\000\009\000\009\000\038\000
\
\009\000\009\000\009\000\039\000\040\000\040\000\043\000\047\000
\
\050\000\000\000\000\000\044\000\040\000\040\000\040\000\040\000
\
\042\000\042\000\042\000\042\000\000\000\041\000\000\000\000\000
\
\040\000\000\000\000\000\000\000\042\000\042\000\042\000\042\000
\
\042\000\044\000\044\000\044\000\044\000\000\000\041\000\000\000
\
\040\000\042\000\045\000\000\000\042\000\044\000\046\000\046\000
\
\046\000\046\000\046\000\046\000\046\000\046\000\000\000\000\000
\
\000\000\042\000\046\000\045\000\000\000\044\000\046\000\047\000
\
\047\000\047\000\047\000\049\000\049\000\049\000\049\000\000\000
\
\048\000\000\000\046\000\047\000\000\000\000\000\046\000\049\000
\
\049\000\049\000\049\000\049\000\000\000\000\000\000\000\000\000
\
\000\000\048\000\000\000\047\000\049\000\000\000\000\000\049\000
\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
\
\000\000\000\000\000\000\000\000\049\000\000\000
"
;
\032\000\033\000\008\000\007\000\007\000\034\000\050\000\006\000
\
\043\000\035\000\013\000\036\000\033\000\017\000\037\000\007\000
\
\037\000\012\000\014\000\013\000\004\000\018\000\039\000\040\000
\
\040\000\009\000\019\000\009\000\019\000\009\000\009\000\009\000
\
\010\000\011\000\010\000\009\000\009\000\047\000\047\000\047\000
\
\047\000\009\000\038\000\004\000\004\000\004\000\048\000\009\000
\
\009\000\047\000\044\000\044\000\044\000\044\000\009\000\043\000
\
\009\000\009\000\050\000\045\000\000\000\000\000\044\000\009\000
\
\000\000\047\000\039\000\040\000\040\000\000\000\040\000\040\000
\
\040\000\040\000\042\000\042\000\042\000\042\000\044\000\041\000
\
\000\000\000\000\040\000\000\000\000\000\000\000\042\000\042\000
\
\042\000\042\000\042\000\044\000\044\000\044\000\044\000\000\000
\
\041\000\000\000\040\000\042\000\045\000\000\000\042\000\044\000
\
\046\000\046\000\046\000\046\000\046\000\046\000\046\000\046\000
\
\000\000\000\000\000\000\042\000\046\000\045\000\000\000\044\000
\
\046\000\047\000\047\000\047\000\047\000\049\000\049\000\049\000
\
\049\000\000\000\048\000\000\000\046\000\047\000\000\000\000\000
\
\046\000\049\000\049\000\049\000\049\000\049\000\000\000\000\000
\
\000\000\000\000\000\000\048\000\000\000\047\000\049\000\000\000
\
\000\000\049\000\000\000\000\000\000\000\000\000\000\000\000\000
\
\000\000\000\000\000\000\000\000\000\000\000\000\049\000\000\000
\
"
;
Lexing
.
lex_check
=
"
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
\
\000\000\000\000\003\000\005\000\001\000\000\000\000\000\000\000
\
\000\000\000\000\002\000\005\000\011\000\000\000\011\000\006\000
\
\018\000\000\000\013\000\000\000\000\000\001\000\000\000\006\000
\
\000\000\017\000\013\000\022\000\025\000\001\000\026\000\026\000
\
\026\000\030\000\001\000\026\000\001\000\026\000\011\000\011\000
\
\002\000\002\000\002\000\023\000\023\000\023\000\023\000\024\000
\
\024\000\024\000\024\000\031\000\023\000\027\000\027\000\023\000
\
\024\000\029\000\032\000\024\000\029\000\033\000\034\000\035\000
\
\031\000\032\000\036\000\039\000\039\000\039\000\043\000\023\000
\
\050\000\255\255\255\255\024\000\040\000\040\000\040\000\040\000
\
\041\000\041\000\041\000\041\000\255\255\040\000\255\255\255\255
\
\040\000\255\255\255\255\255\255\041\000\042\000\042\000\042\000
\
\042\000\044\000\044\000\044\000\044\000\255\255\042\000\255\255
\
\040\000\042\000\044\000\255\255\041\000\044\000\045\000\045\000
\
\045\000\045\000\046\000\046\000\046\000\046\000\255\255\255\255
\
\255\255\042\000\045\000\046\000\255\255\044\000\046\000\047\000
\
\047\000\047\000\047\000\048\000\048\000\048\000\048\000\255\255
\
\047\000\255\255\045\000\047\000\255\255\255\255\046\000\048\000
\
\049\000\049\000\049\000\049\000\255\255\255\255\255\255\255\255
\
\255\255\049\000\255\255\047\000\049\000\255\255\255\255\048\000
\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255
\
\255\255\255\255\255\255\255\255\049\000\255\255
"
\000\000\000\000\002\000\005\000\018\000\000\000\022\000\006\000
\
\025\000\000\000\013\000\000\000\000\000\001\000\000\000\006\000
\
\000\000\011\000\013\000\011\000\017\000\001\000\026\000\026\000
\
\026\000\030\000\001\000\026\000\001\000\026\000\027\000\027\000
\
\002\000\002\000\002\000\031\000\033\000\023\000\023\000\023\000
\
\023\000\034\000\035\000\011\000\011\000\011\000\023\000\036\000
\
\031\000\023\000\024\000\024\000\024\000\024\000\029\000\043\000
\
\032\000\029\000\050\000\024\000\255\255\255\255\024\000\032\000
\
\255\255\023\000\039\000\039\000\039\000\255\255\040\000\040\000
\
\040\000\040\000\041\000\041\000\041\000\041\000\024\000\040\000
\
\255\255\255\255\040\000\255\255\255\255\255\255\041\000\042\000
\
\042\000\042\000\042\000\044\000\044\000\044\000\044\000\255\255
\
\042\000\255\255\040\000\042\000\044\000\255\255\041\000\044\000
\
\045\000\045\000\045\000\045\000\046\000\046\000\046\000\046\000
\
\255\255\255\255\255\255\042\000\045\000\046\000\255\255\044\000
\
\046\000\047\000\047\000\047\000\047\000\048\000\048\000\048\000
\
\048\000\255\255\047\000\255\255\045\000\047\000\255\255\255\255
\
\046\000\048\000\049\000\049\000\049\000\049\000\255\255\255\255
\
\255\255\255\255\255\255\049\000\255\255\047\000\049\000\255\255
\
\255\255\048\000\255\255\255\255\255\255\255\255\255\255\255\255
\
\255\255\255\255\255\255\255\255\255\255\255\255\049\000\255\255
\
"
}
let
rec
token
engine
lexbuf
=
...
...
parser/wlexer.mll
View file @
00fcca64
...
...
@@ -133,7 +133,7 @@ and string ender = parse
if
c
=
ender
then
()
else
(
store_char
(
Lexing
.
lexeme
lexbuf
);
string
ender
engine
lexbuf
)
}
|
'\\'
[
'\\'
'
"']
|
'\\'
[
'\\'
'
"'
'
\'
'
]
{ store_ascii (Lexing.lexeme_char lexbuf 1);
string ender engine lexbuf }
| '
\\
' lowercase {
...
...
web/examples/ovfun.cd
View file @
00fcca64
...
...
@@ -11,11 +11,11 @@ type Woman = <woman name=String>[ Sons Daughters ];;
type Sons = <sons>[ Man* ];;
type Daughters = <daughters>[ Woman* ];;
let fun s
or
t (MPerson -> Man ; FPerson -> Woman)
let fun s
pli
t (MPerson -> Man ; FPerson -> Woman)
<person gender=g>[ <name>n <children>[(mc::MPerson | fc::FPerson)*]; _] ->
let tag = match g with "F" -> `woman | "M" -> `man in
let s = map mc with x -> s
or
t x in
let d = map fc with x -> s
or
t x in
let s = map mc with x -> s
pli
t x in
let d = map fc with x -> s
pli
t x in
<(tag) name=n>[ <sons>s <daughters>d ]
;;
...
...
@@ -44,4 +44,4 @@ let base : Person =
;;
s
or
t base;;
s
pli
t base;;
web/memento.xml
View file @
00fcca64
...
...
@@ -219,8 +219,8 @@ Tn = tn</duce>.</li>
<li>
Type declarations:
<duce>
type T = t
</duce>
.
</li>
<li>
Source inclusion:
<duce>
include
</duce>
<i>
filename_string
</i></li>
<li>
Debug directives:
<duce>
debug
</duce>
<i>
directive argument
</i>
<br/>
where
<i>
directive
</i>
is one of the following:
<duce>
accept
</duce>
,
<duce>
subtype
</duce>
,
<duce>
accept
</duce>
,
<duce>
compile
</duce>
.
where
<i>
directive
</i>
is one of the following:
<duce>
accept
</duce>
,
<duce>
subtype
</duce>
,
<duce>
compile
</duce>
.
</li>
</ul>
</box>
...
...
web/overloading.cd
View file @
00fcca64
...
...
@@ -9,10 +9,10 @@ type Woman = <woman name=String>[ Sons Daughters ];;
type Sons = <sons>[ Man* ];;
type Daughters = <daughters>[ Woman* ];;
let fun s
or
t (MPerson -> Man ; FPerson -> Woman)
let fun s
pli
t (MPerson -> Man ; FPerson -> Woman)
<person gender=g>[ <name>n <children>[(mc::MPerson | fc::FPerson)*] ] ->
(* this pattern collects all the MPerson in mc, and all the FPerson in fc *)
let tag = match g with "F" -> `woman | "M" -> `man in
let s = map mc with x -> s
or
t x in
let d = map fc with x -> s
or
t x in
let s = map mc with x -> s
pli
t x in
let d = map fc with x -> s
pli
t x in
<(tag) name=n>[ <sons>s <daughters>d ] ;;
web/site.cd
View file @
00fcca64
...
...
@@ -105,17 +105,17 @@ let php_css : String =
['
<?php
$browser = getenv("HTTP_USER_AGENT");
if (preg_match("/MSIE/i", "$browser")) {
$css = "<link rel=\"stylesheet\" href=\"cduce.css\"
type=\"text/css\">";
$css = "<link rel=\
\
"stylesheet\
\
" href=\
\
"cduce.css\
\
"
type=\
\
"text/css\
\
">";
} elseif (preg_match("/Mozilla/i", "$browser")) {
$css = "<blink>For better presentation use a more recent version
of your browser, like Netscape 6</blink>";
} if (preg_match("/Mozilla\/5.0/i", "$browser")) {
$css = "<link rel=\"stylesheet\" href=\"cduce.css\"
type=\"text/css\">";
} if (preg_match("/Mozilla\
\
/5.0/i", "$browser")) {
$css = "<link rel=\
\
"stylesheet\
\
" href=\
\
"cduce.css\
\
"
type=\
\
"text/css\
\
">";
} elseif (preg_match("/opera/i", "$browser")) {
$css = "<link rel=\"stylesheet\" href=\"cduce.css\"
type=\"text/css\">";
$css = "<link rel=\
\
"stylesheet\
\
" href=\
\
"cduce.css\
\
"
type=\
\
"text/css\
\
">";
}
echo "$css";
?>
'];;
...
...
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