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
dee8ef32
Commit
dee8ef32
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2002-11-16 22:29:36 by cvscast] Empty log message
Original author: cvscast Date: 2002-11-16 22:29:36+00:00
parent
fed80cb1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/biblio.cd
View file @
dee8ef32
type Biblio =
<bibliography>
[Heading Paper*];;
type Heading =
<heading>
[ PCDATA ];;
type Paper =
<paper>
[Author+ Title Conference
File
];;
type Paper =
<paper>
[Author+ Title
((
Conference
Series?) |(Journal Volume? Number)) Publisher? Year File Abstract?
];;
type Author =
<author>
[ PCDATA ];;
type Title =
<title>
[ PCDATA ];;
type Conference =
<conference>
[ PCDATA ];;
type Series =
<series>
[ PCDATA ];;
type Journal =
<journal>
[ PCDATA ];;
type Publisher =
<publisher>
[ PCDATA ];;
type Volume =
<volume>
[ Int ];;
type Number =
<number>
[ Int ];;
type Year =
<year>
[ 1970--2010 ];;
type File =
<file>
[ PCDATA ];;
type Abstract=
<abstract>
Text;;
type Text = [ PCDATA ];;
type Html =
<html>
[Head? Body];;
type Head =
<head>
[
<title>
[ PCDATA ] ];;
...
...
@@ -22,11 +31,12 @@ let fun do_authors ([Author+] -> [Mix*])
| [
<author>
a; x] -> a @ ", " @ (do_authors x);;
let fun do_paper (Paper ->
<li>
[Mix*])
<paper>
[ x::(_* )
<title>
t
<
conference>
c
<file>
f ] ->
|
<paper>
[ x::(_* )
<title>
t
<
_>
c _*
<year>
y
<file>
f
;_
] ->
(* Here, type inference says: x : [Author+] ... *)
let authors = do_authors x in
<li>
([
<a
href=
f
>
t ] @ authors @ "; in " @ [
<em>
c ] @ "." );;
let fun do_biblio (Biblio -> Html)
<bibliography>
[
<heading>
h; p ] ->
let body = match p with
...
...
@@ -44,7 +54,19 @@ let bib : Biblio =
<author>
"Vronique Benzaken"
<title>
"Semantic subtyping"
<conference>
"LICS 02"
<year>
[2002]
<file>
"semsub.ps.gz"
<abstract>
[ 'In this work, we present the functional language CDuce, discuss '
'some design issues, and show its adequacy for working with XML '
'documents. Peculiar features of CDuce are a powerful pattern '
'matching, first class functions, overloaded functions, a very rich '
'type system (arrows, sequences, pairs, records, intersections, '
'unions, differences), precise type inference and a natural '
'interpretation of types as sets of values. We also discuss how to '
'add constructs for programming XML queries in a declarative (and, '
'thus, optimizable) way and finally sketch a dispatch algorithm to '
'demonstrate how static type information can be used in efficient '
'compilation schemas.' ]
]
<paper>
[
<author>
"Mariangiola Dezani-Ciancaglini"
...
...
@@ -53,6 +75,7 @@ let bib : Biblio =
<author>
"Yoko Motohama"
<title>
"The Relevance of Semantic Subtyping"
<conference>
"ITRS'02"
<year>
[2002]
<file>
"itrs02.ps.gz"
]
<paper>
[
...
...
@@ -61,6 +84,7 @@ let bib : Biblio =
<author>
"Alain Frisch"
<title>
"CDuce: a white-paper"
<conference>
"PLANX-02"
<year>
[2002]
<file>
"planx.ps.gz"
]
];;
...
...
tests/web.cd
View file @
dee8ef32
...
...
@@ -106,3 +106,4 @@ let doc : Html =
];;
dump_to_file "tests/examples.html" (print_xml doc);;
*)
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