summaryrefslogtreecommitdiff
path: root/next-lib/src/abstract/Symbol.gf
blob: a8ac9ca1bffde8e4181a7766b6f29a5582ccf727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--1 Symbolic expressions

-- *Note*. This module is not automatically included in the main
-- grammar [Lang Lang.html].

abstract Symbol = Cat, PredefAbs ** {

--2 Noun phrases with symbols and numbers

fun

  SymbPN   : Symb -> PN ;                -- x
  IntPN    : Int -> PN ;                 -- 27
  FloatPN  : Float -> PN ;               -- 3.14159
  NumPN    : Card -> PN ;
  CNNumNP  : CN -> Card -> NP ;          -- level five ; level 5
  CNSymbNP : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y


--2 Sentence consisting of a formula

  SymbS    : Symb -> S ;                 -- A

--2 Symbols as numerals

  SymbNum  : Symb -> Card ;              -- n
  SymbOrd  : Symb -> Ord ;               -- n'th

--2 Symbol lists

-- A symbol list has at least two elements. The last two are separated
-- by a conjunction ("and" in English), the others by commas.
-- This produces "x, y and z", in English. 

cat
  Symb ;
  [Symb]{2} ;

fun
  MkSymb : String -> Symb ;

--2 Obsolescent

  CNIntNP  : CN -> Int -> NP ;           -- level 53 (covered by CNNumNP)

}