Commit 00fcca64 authored by Pietro Abate's avatar 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
......@@ -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)
......
......@@ -96,11 +96,11 @@ type Woman = <woman name=String>[ Sons Daughters ];;
type Sons = <sons>[ Man* ];;
type Daughters = <daughters>[ Woman* ];;
let fun sort (MPerson -> Man ; FPerson -> Woman)
let fun split (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 -> sort x in
let d = map fc with x -> sort x in
let s = map mc with x -> split x in
let d = map fc with x -> split x in
<(tag) name=n>[ <sons>s <daughters>d ]
;;
......@@ -129,7 +129,7 @@ let base : Person =
;;
sort base;;
split base;;
";"note","
type Doc = <doc>Text;;
type Text = [ (Char | (Letter+ ' '* Note))* ];;
......
......@@ -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\016\000\253\255\020\000\252\255\252\255\
\251\255\007\000\007\000\253\255\247\255\246\255\032\000\047\000\
\051\000\030\000\035\000\052\000\250\255\055\000\027\000\044\000\
\057\000\041\000\043\000\054\000\052\000\249\255\248\255\072\000\
\080\000\084\000\097\000\072\000\101\000\114\000\118\000\131\000\
\135\000\148\000\077\000";
\251\255\250\255\255\255\029\000\253\255\020\000\252\255\252\255\
\251\255\010\000\003\000\253\255\247\255\246\255\019\000\049\000\
\062\000\018\000\035\000\037\000\250\255\060\000\027\000\036\000\
\063\000\024\000\030\000\041\000\041\000\249\255\248\255\079\000\
\082\000\086\000\099\000\065\000\103\000\116\000\120\000\133\000\
\137\000\150\000\071\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 =
......
......@@ -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 {
......
......@@ -11,11 +11,11 @@ type Woman = <woman name=String>[ Sons Daughters ];;
type Sons = <sons>[ Man* ];;
type Daughters = <daughters>[ Woman* ];;
let fun sort (MPerson -> Man ; FPerson -> Woman)
let fun split (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 -> sort x in
let d = map fc with x -> sort x in
let s = map mc with x -> split x in
let d = map fc with x -> split x in
<(tag) name=n>[ <sons>s <daughters>d ]
;;
......@@ -44,4 +44,4 @@ let base : Person =
;;
sort base;;
split base;;
......@@ -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>
......
......@@ -9,10 +9,10 @@ type Woman = <woman name=String>[ Sons Daughters ];;
type Sons = <sons>[ Man* ];;
type Daughters = <daughters>[ Woman* ];;
let fun sort (MPerson -> Man ; FPerson -> Woman)
let fun split (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 -> sort x in
let d = map fc with x -> sort x in
let s = map mc with x -> split x in
let d = map fc with x -> split x in
<(tag) name=n>[ <sons>s <daughters>d ] ;;
......@@ -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";
?> '];;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment