summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-07-04 09:39:24 +0000
committeraarne <aarne@cs.chalmers.se>2007-07-04 09:39:24 +0000
commit74bb2ffdf3d3abc274c5017232321dc4f2f54067 (patch)
treea8b976dfde17c482a2d3fa89038235c2a191d12b /doc
parent39de0bca42b440754233b339dfc0878e71cf99d3 (diff)
extended Synopsis with categories, structural, and an example
Diffstat (limited to 'doc')
-rw-r--r--doc/intro-resource.txt29
1 files changed, 16 insertions, 13 deletions
diff --git a/doc/intro-resource.txt b/doc/intro-resource.txt
index 74a366d87..25dcebde7 100644
--- a/doc/intro-resource.txt
+++ b/doc/intro-resource.txt
@@ -143,29 +143,32 @@ two interfaces: the resource ``Syntax`` and an application lexicon.
American = mkAP american_A ;
}
```
-The application lexicon ``MusicLex`` has an abstract syntax that extends
-the resource category system ``Cat``.
+The application lexicon ``MusicLex`` is an interface
+opening the resource category system ``Cat``.
```
- abstract MusicLex = Cat ** {
-
- fun
+ interface MusicLex = Cat ** {
+ oper
song_N : N ;
american_A : A ;
}
```
+It could also be an abstract syntax that extends ``Cat``, but
+this would limit the kind of constructions that are possible in
+the interface
+
Each language has its own concrete syntax, which opens the
inflectional paradigms module for that language:
```
- concrete MusicLexGer of MusicLex =
+ interface MusicLexGer of MusicLex =
CatGer ** open ParadigmsGer in {
- lin
+ oper
song_N = mkN "Lied" "Lieder" neuter ;
american_A = mkA "amerikanisch" ;
}
- concrete MusicLexFre of MusicLex =
+ interface MusicLexFre of MusicLex =
CatFre ** open ParadigmsFre in {
- lin
+ oper
song_N = mkN "chanson" feminine ;
american_A = mkA "américain" ;
}
@@ -195,9 +198,9 @@ instantiating ``Music``. The latter is
completely trivial, whereas the former one involves the choice of correct
vocabulary and inflectional paradigms. For instance, Finnish is added as follows:
```
- concrete MusicLexFin of MusicLex =
+ instance MusicLexFin of MusicLex =
CatFin ** open ParadigmsFin in {
- lin
+ oper
song_N = mkN "kappale" ;
american_A = mkA "amerikkalainen" ;
}
@@ -226,9 +229,9 @@ restricted inheritance of the functor:
```
The lexicon is as expected:
```
- concrete MusicLexEng of MusicLex =
+ instance MusicLexEng of MusicLex =
CatEng ** open ParadigmsEng in {
- lin
+ oper
song_N = mkN "song" ;
american_A = mkA "American" ;
}