expressir 2.4.47-x86_64-linux → 2.4.49-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/_guides/reference/grammar-crosswalk.adoc +1 -0
- data/expressir.gemspec +1 -1
- data/grammar-parg/CONVENTIONS.md +90 -0
- data/grammar-parg/RULE-INVENTORY.txt +252 -0
- data/grammar-parg/atoms_to_parg.rb +232 -0
- data/grammar-parg/bisect.sh +37 -0
- data/grammar-parg/ddmin.sh +39 -0
- data/grammar-parg/dsl-dump.json +1 -0
- data/grammar-parg/entries.parg.frag +12 -0
- data/grammar-parg/express-grammar.artifact.json +1 -0
- data/grammar-parg/express-grammar.parg +381 -0
- data/grammar-parg/express.json +1 -0
- data/grammar-parg/express.parg +57 -0
- data/grammar-parg/express_keywords.parg +132 -0
- data/grammar-parg/express_literals.parg +14 -0
- data/grammar-parg/express_operators.parg +34 -0
- data/grammar-parg/express_remarks.parg +19 -0
- data/grammar-parg/express_structure.parg +11 -0
- data/grammar-parg/generate-terminals.rb +55 -0
- data/grammar-parg/keywords.parg.frag +130 -0
- data/grammar-parg/literals.parg.frag +9 -0
- data/grammar-parg/operators.parg.frag +34 -0
- data/grammar-parg/parity-model.rb +68 -0
- data/grammar-parg/parity-vm.rb +60 -0
- data/grammar-parg/parity.sh +66 -0
- data/grammar-parg/parser-dsl-reference.rb.txt +757 -0
- data/grammar-parg/splice.rb +16 -0
- data/grammar-parg/tree_diff.rb +62 -0
- data/lib/expressir/express/grammar/express-grammar.artifact.json +1 -0
- data/lib/expressir/express/grammar/parser.rb +55 -1
- data/lib/expressir/express/parser.rb +3 -3
- data/lib/expressir/express/remark_attacher.rb +4 -2
- data/lib/expressir/model/model_element.rb +3 -0
- data/lib/expressir/reference/grammar_crosswalk.yml +3 -0
- data/lib/expressir/version.rb +1 -1
- metadata +31 -10
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
use express_keywords
|
|
2
|
+
use express_structure
|
|
3
|
+
use express_remarks
|
|
4
|
+
use express_literals
|
|
5
|
+
use express_operators
|
|
6
|
+
|
|
7
|
+
# EXPRESS grammar — PARG edition 2.
|
|
8
|
+
#
|
|
9
|
+
# The translation of lib/expressir/express/grammar/parser.rb, rule by
|
|
10
|
+
# rule; see CONVENTIONS.md for the mapping and the parity-critical
|
|
11
|
+
# surfaces. Composition is native PARG: keyword/scalar/operator
|
|
12
|
+
# terminals live in their own grammar files, imported by `use` with
|
|
13
|
+
# namespaced references.
|
|
14
|
+
grammar ExpressSyntax version "0.1.0" edition 2 {
|
|
15
|
+
|
|
16
|
+
# match[" \r\n\t\f"].repeat(1)
|
|
17
|
+
trivia = 1*(%x20 / %x0D / %x0A / %x09 / %x0C)
|
|
18
|
+
|
|
19
|
+
# The DSL's skip(:trivia, whitespace: :space, exempt: ...) — the
|
|
20
|
+
# exempted rules become `atomic` declarations as they land; the
|
|
21
|
+
# remark rules stay OUT of the skip surface (they are product data).
|
|
22
|
+
skip = trivia
|
|
23
|
+
|
|
24
|
+
# Grows as structural bodies land; today: statement = skipStmt.
|
|
25
|
+
stmt = express_structure.skipStmt
|
|
26
|
+
syntax = *stmt
|
|
27
|
+
|
|
28
|
+
# --- probe entries (mid-migration; the final entry is `syntax`) ---
|
|
29
|
+
# local aliases over the namespaced imports (entry targets are local)
|
|
30
|
+
embeddedRemark = express_remarks.embeddedRemark
|
|
31
|
+
tailRemark = express_remarks.tailRemark
|
|
32
|
+
simpleId = express_literals.simpleId
|
|
33
|
+
simpleStringLiteral = express_literals.simpleStringLiteral
|
|
34
|
+
digits = (express_literals.digits) as digits
|
|
35
|
+
op_decl = express_operators.op_decl
|
|
36
|
+
op_colon_less_greater_colon = express_operators.op_colon_less_greater_colon
|
|
37
|
+
tSCHEMA = express_keywords.tSCHEMA
|
|
38
|
+
tBASED_ON = express_keywords.tBASED_ON
|
|
39
|
+
tGENERIC_ENTITY = express_keywords.tGENERIC_ENTITY
|
|
40
|
+
tEND_SUBTYPE_CONSTRAINT = express_keywords.tEND_SUBTYPE_CONSTRAINT
|
|
41
|
+
|
|
42
|
+
entry embeddedRemark: embeddedRemark
|
|
43
|
+
entry tailRemark: tailRemark
|
|
44
|
+
skipStmt = express_structure.skipStmt
|
|
45
|
+
entry skipStmt: skipStmt
|
|
46
|
+
entry syntax: syntax
|
|
47
|
+
entry simpleId: simpleId
|
|
48
|
+
entry simpleStringLiteral: simpleStringLiteral
|
|
49
|
+
entry digits: digits
|
|
50
|
+
entry op_decl: op_decl
|
|
51
|
+
entry op_colon_less_greater_colon: op_colon_less_greater_colon
|
|
52
|
+
entry tSCHEMA: tSCHEMA
|
|
53
|
+
entry tBASED_ON: tBASED_ON
|
|
54
|
+
entry tGENERIC_ENTITY: tGENERIC_ENTITY
|
|
55
|
+
entry tEND_SUBTYPE_CONSTRAINT: tEND_SUBTYPE_CONSTRAINT
|
|
56
|
+
entry syntax: syntax
|
|
57
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# EXPRESS keyword terminals: case-insensitive literals with the
|
|
2
|
+
# trailing identifier guard; kwAny = the ordered union (anyKeyword).
|
|
3
|
+
grammar ExpressKeywords version "0.1.0" edition 2 {
|
|
4
|
+
# The trailing-identifier guard: a keyword must not be followed by
|
|
5
|
+
# a letter, digit, or underscore (the DSL's match[a-zA-Z0-9_].absent?).
|
|
6
|
+
identGuard = !(%x41-5A / %x61-7A / %x30-39 / "_")
|
|
7
|
+
tABS = ((("A" / "a") ("B" / "b") ("S" / "s") identGuard) as str) as tABS
|
|
8
|
+
tABSTRACT = ((("A" / "a") ("B" / "b") ("S" / "s") ("T" / "t") ("R" / "r") ("A" / "a") ("C" / "c") ("T" / "t") identGuard) as str) as tABSTRACT
|
|
9
|
+
tACOS = ((("A" / "a") ("C" / "c") ("O" / "o") ("S" / "s") identGuard) as str) as tACOS
|
|
10
|
+
tAGGREGATE = ((("A" / "a") ("G" / "g") ("G" / "g") ("R" / "r") ("E" / "e") ("G" / "g") ("A" / "a") ("T" / "t") ("E" / "e") identGuard) as str) as tAGGREGATE
|
|
11
|
+
tALIAS = ((("A" / "a") ("L" / "l") ("I" / "i") ("A" / "a") ("S" / "s") identGuard) as str) as tALIAS
|
|
12
|
+
tAND = ((("A" / "a") ("N" / "n") ("D" / "d") identGuard) as str) as tAND
|
|
13
|
+
tANDOR = ((("A" / "a") ("N" / "n") ("D" / "d") ("O" / "o") ("R" / "r") identGuard) as str) as tANDOR
|
|
14
|
+
tARRAY = ((("A" / "a") ("R" / "r") ("R" / "r") ("A" / "a") ("Y" / "y") identGuard) as str) as tARRAY
|
|
15
|
+
tAS = ((("A" / "a") ("S" / "s") identGuard) as str) as tAS
|
|
16
|
+
tASIN = ((("A" / "a") ("S" / "s") ("I" / "i") ("N" / "n") identGuard) as str) as tASIN
|
|
17
|
+
tATAN = ((("A" / "a") ("T" / "t") ("A" / "a") ("N" / "n") identGuard) as str) as tATAN
|
|
18
|
+
tBAG = ((("B" / "b") ("A" / "a") ("G" / "g") identGuard) as str) as tBAG
|
|
19
|
+
tBASED_ON = ((("B" / "b") ("A" / "a") ("S" / "s") ("E" / "e") ("D" / "d") "_" ("O" / "o") ("N" / "n") identGuard) as str) as tBASED_ON
|
|
20
|
+
tBEGIN = ((("B" / "b") ("E" / "e") ("G" / "g") ("I" / "i") ("N" / "n") identGuard) as str) as tBEGIN
|
|
21
|
+
tBINARY = ((("B" / "b") ("I" / "i") ("N" / "n") ("A" / "a") ("R" / "r") ("Y" / "y") identGuard) as str) as tBINARY
|
|
22
|
+
tBLENGTH = ((("B" / "b") ("L" / "l") ("E" / "e") ("N" / "n") ("G" / "g") ("T" / "t") ("H" / "h") identGuard) as str) as tBLENGTH
|
|
23
|
+
tBOOLEAN = ((("B" / "b") ("O" / "o") ("O" / "o") ("L" / "l") ("E" / "e") ("A" / "a") ("N" / "n") identGuard) as str) as tBOOLEAN
|
|
24
|
+
tBY = ((("B" / "b") ("Y" / "y") identGuard) as str) as tBY
|
|
25
|
+
tCASE = ((("C" / "c") ("A" / "a") ("S" / "s") ("E" / "e") identGuard) as str) as tCASE
|
|
26
|
+
tCONSTANT = ((("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("A" / "a") ("N" / "n") ("T" / "t") identGuard) as str) as tCONSTANT
|
|
27
|
+
tCONST_E = ((("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") "_" ("E" / "e") identGuard) as str) as tCONST_E
|
|
28
|
+
tCOS = ((("C" / "c") ("O" / "o") ("S" / "s") identGuard) as str) as tCOS
|
|
29
|
+
tDERIVE = ((("D" / "d") ("E" / "e") ("R" / "r") ("I" / "i") ("V" / "v") ("E" / "e") identGuard) as str) as tDERIVE
|
|
30
|
+
tDIV = ((("D" / "d") ("I" / "i") ("V" / "v") identGuard) as str) as tDIV
|
|
31
|
+
tELSE = ((("E" / "e") ("L" / "l") ("S" / "s") ("E" / "e") identGuard) as str) as tELSE
|
|
32
|
+
tEND = ((("E" / "e") ("N" / "n") ("D" / "d") identGuard) as str) as tEND
|
|
33
|
+
tEND_ALIAS = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("A" / "a") ("L" / "l") ("I" / "i") ("A" / "a") ("S" / "s") identGuard) as str) as tEND_ALIAS
|
|
34
|
+
tEND_CASE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("C" / "c") ("A" / "a") ("S" / "s") ("E" / "e") identGuard) as str) as tEND_CASE
|
|
35
|
+
tEND_CONSTANT = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("A" / "a") ("N" / "n") ("T" / "t") identGuard) as str) as tEND_CONSTANT
|
|
36
|
+
tEND_ENTITY = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("E" / "e") ("N" / "n") ("T" / "t") ("I" / "i") ("T" / "t") ("Y" / "y") identGuard) as str) as tEND_ENTITY
|
|
37
|
+
tEND_FUNCTION = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("F" / "f") ("U" / "u") ("N" / "n") ("C" / "c") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") identGuard) as str) as tEND_FUNCTION
|
|
38
|
+
tEND_IF = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("I" / "i") ("F" / "f") identGuard) as str) as tEND_IF
|
|
39
|
+
tEND_LOCAL = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("L" / "l") ("O" / "o") ("C" / "c") ("A" / "a") ("L" / "l") identGuard) as str) as tEND_LOCAL
|
|
40
|
+
tEND_PROCEDURE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("P" / "p") ("R" / "r") ("O" / "o") ("C" / "c") ("E" / "e") ("D" / "d") ("U" / "u") ("R" / "r") ("E" / "e") identGuard) as str) as tEND_PROCEDURE
|
|
41
|
+
tEND_REPEAT = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("R" / "r") ("E" / "e") ("P" / "p") ("E" / "e") ("A" / "a") ("T" / "t") identGuard) as str) as tEND_REPEAT
|
|
42
|
+
tEND_RULE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("R" / "r") ("U" / "u") ("L" / "l") ("E" / "e") identGuard) as str) as tEND_RULE
|
|
43
|
+
tEND_SCHEMA = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("S" / "s") ("C" / "c") ("H" / "h") ("E" / "e") ("M" / "m") ("A" / "a") identGuard) as str) as tEND_SCHEMA
|
|
44
|
+
tEND_SUBTYPE_CONSTRAINT = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("S" / "s") ("U" / "u") ("B" / "b") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") "_" ("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("R" / "r") ("A" / "a") ("I" / "i") ("N" / "n") ("T" / "t") identGuard) as str) as tEND_SUBTYPE_CONSTRAINT
|
|
45
|
+
tEND_TYPE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tEND_TYPE
|
|
46
|
+
tENTITY = ((("E" / "e") ("N" / "n") ("T" / "t") ("I" / "i") ("T" / "t") ("Y" / "y") identGuard) as str) as tENTITY
|
|
47
|
+
tENUMERATION = ((("E" / "e") ("N" / "n") ("U" / "u") ("M" / "m") ("E" / "e") ("R" / "r") ("A" / "a") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") identGuard) as str) as tENUMERATION
|
|
48
|
+
tESCAPE = ((("E" / "e") ("S" / "s") ("C" / "c") ("A" / "a") ("P" / "p") ("E" / "e") identGuard) as str) as tESCAPE
|
|
49
|
+
tEXISTS = ((("E" / "e") ("X" / "x") ("I" / "i") ("S" / "s") ("T" / "t") ("S" / "s") identGuard) as str) as tEXISTS
|
|
50
|
+
tEXP = ((("E" / "e") ("X" / "x") ("P" / "p") identGuard) as str) as tEXP
|
|
51
|
+
tEXTENSIBLE = ((("E" / "e") ("X" / "x") ("T" / "t") ("E" / "e") ("N" / "n") ("S" / "s") ("I" / "i") ("B" / "b") ("L" / "l") ("E" / "e") identGuard) as str) as tEXTENSIBLE
|
|
52
|
+
tFALSE = ((("F" / "f") ("A" / "a") ("L" / "l") ("S" / "s") ("E" / "e") identGuard) as str) as tFALSE
|
|
53
|
+
tFIXED = ((("F" / "f") ("I" / "i") ("X" / "x") ("E" / "e") ("D" / "d") identGuard) as str) as tFIXED
|
|
54
|
+
tFOR = ((("F" / "f") ("O" / "o") ("R" / "r") identGuard) as str) as tFOR
|
|
55
|
+
tFORMAT = ((("F" / "f") ("O" / "o") ("R" / "r") ("M" / "m") ("A" / "a") ("T" / "t") identGuard) as str) as tFORMAT
|
|
56
|
+
tFROM = ((("F" / "f") ("R" / "r") ("O" / "o") ("M" / "m") identGuard) as str) as tFROM
|
|
57
|
+
tFUNCTION = ((("F" / "f") ("U" / "u") ("N" / "n") ("C" / "c") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") identGuard) as str) as tFUNCTION
|
|
58
|
+
tGENERIC_ENTITY = ((("G" / "g") ("E" / "e") ("N" / "n") ("E" / "e") ("R" / "r") ("I" / "i") ("C" / "c") "_" ("E" / "e") ("N" / "n") ("T" / "t") ("I" / "i") ("T" / "t") ("Y" / "y") identGuard) as str) as tGENERIC_ENTITY
|
|
59
|
+
tGENERIC = ((("G" / "g") ("E" / "e") ("N" / "n") ("E" / "e") ("R" / "r") ("I" / "i") ("C" / "c") identGuard) as str) as tGENERIC
|
|
60
|
+
tHIBOUND = ((("H" / "h") ("I" / "i") ("B" / "b") ("O" / "o") ("U" / "u") ("N" / "n") ("D" / "d") identGuard) as str) as tHIBOUND
|
|
61
|
+
tHIINDEX = ((("H" / "h") ("I" / "i") ("I" / "i") ("N" / "n") ("D" / "d") ("E" / "e") ("X" / "x") identGuard) as str) as tHIINDEX
|
|
62
|
+
tIF = ((("I" / "i") ("F" / "f") identGuard) as str) as tIF
|
|
63
|
+
tIN = ((("I" / "i") ("N" / "n") identGuard) as str) as tIN
|
|
64
|
+
tINSERT = ((("I" / "i") ("N" / "n") ("S" / "s") ("E" / "e") ("R" / "r") ("T" / "t") identGuard) as str) as tINSERT
|
|
65
|
+
tINTEGER = ((("I" / "i") ("N" / "n") ("T" / "t") ("E" / "e") ("G" / "g") ("E" / "e") ("R" / "r") identGuard) as str) as tINTEGER
|
|
66
|
+
tINVERSE = ((("I" / "i") ("N" / "n") ("V" / "v") ("E" / "e") ("R" / "r") ("S" / "s") ("E" / "e") identGuard) as str) as tINVERSE
|
|
67
|
+
tLENGTH = ((("L" / "l") ("E" / "e") ("N" / "n") ("G" / "g") ("T" / "t") ("H" / "h") identGuard) as str) as tLENGTH
|
|
68
|
+
tLIKE = ((("L" / "l") ("I" / "i") ("K" / "k") ("E" / "e") identGuard) as str) as tLIKE
|
|
69
|
+
tLIST = ((("L" / "l") ("I" / "i") ("S" / "s") ("T" / "t") identGuard) as str) as tLIST
|
|
70
|
+
tLOBOUND = ((("L" / "l") ("O" / "o") ("B" / "b") ("O" / "o") ("U" / "u") ("N" / "n") ("D" / "d") identGuard) as str) as tLOBOUND
|
|
71
|
+
tLOCAL = ((("L" / "l") ("O" / "o") ("C" / "c") ("A" / "a") ("L" / "l") identGuard) as str) as tLOCAL
|
|
72
|
+
tLOG = ((("L" / "l") ("O" / "o") ("G" / "g") identGuard) as str) as tLOG
|
|
73
|
+
tLOG10 = ((("L" / "l") ("O" / "o") ("G" / "g") "1" "0" identGuard) as str) as tLOG10
|
|
74
|
+
tLOG2 = ((("L" / "l") ("O" / "o") ("G" / "g") "2" identGuard) as str) as tLOG2
|
|
75
|
+
tLOGICAL = ((("L" / "l") ("O" / "o") ("G" / "g") ("I" / "i") ("C" / "c") ("A" / "a") ("L" / "l") identGuard) as str) as tLOGICAL
|
|
76
|
+
tLOINDEX = ((("L" / "l") ("O" / "o") ("I" / "i") ("N" / "n") ("D" / "d") ("E" / "e") ("X" / "x") identGuard) as str) as tLOINDEX
|
|
77
|
+
tMOD = ((("M" / "m") ("O" / "o") ("D" / "d") identGuard) as str) as tMOD
|
|
78
|
+
tNOT = ((("N" / "n") ("O" / "o") ("T" / "t") identGuard) as str) as tNOT
|
|
79
|
+
tNUMBER = ((("N" / "n") ("U" / "u") ("M" / "m") ("B" / "b") ("E" / "e") ("R" / "r") identGuard) as str) as tNUMBER
|
|
80
|
+
tNVL = ((("N" / "n") ("V" / "v") ("L" / "l") identGuard) as str) as tNVL
|
|
81
|
+
tODD = ((("O" / "o") ("D" / "d") ("D" / "d") identGuard) as str) as tODD
|
|
82
|
+
tOF = ((("O" / "o") ("F" / "f") identGuard) as str) as tOF
|
|
83
|
+
tONEOF = ((("O" / "o") ("N" / "n") ("E" / "e") ("O" / "o") ("F" / "f") identGuard) as str) as tONEOF
|
|
84
|
+
tOPTIONAL = ((("O" / "o") ("P" / "p") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") ("A" / "a") ("L" / "l") identGuard) as str) as tOPTIONAL
|
|
85
|
+
tOR = ((("O" / "o") ("R" / "r") identGuard) as str) as tOR
|
|
86
|
+
tOTHERWISE = ((("O" / "o") ("T" / "t") ("H" / "h") ("E" / "e") ("R" / "r") ("W" / "w") ("I" / "i") ("S" / "s") ("E" / "e") identGuard) as str) as tOTHERWISE
|
|
87
|
+
tPI = ((("P" / "p") ("I" / "i") identGuard) as str) as tPI
|
|
88
|
+
tPROCEDURE = ((("P" / "p") ("R" / "r") ("O" / "o") ("C" / "c") ("E" / "e") ("D" / "d") ("U" / "u") ("R" / "r") ("E" / "e") identGuard) as str) as tPROCEDURE
|
|
89
|
+
tQUERY = ((("Q" / "q") ("U" / "u") ("E" / "e") ("R" / "r") ("Y" / "y") identGuard) as str) as tQUERY
|
|
90
|
+
tREAL = ((("R" / "r") ("E" / "e") ("A" / "a") ("L" / "l") identGuard) as str) as tREAL
|
|
91
|
+
tREFERENCE = ((("R" / "r") ("E" / "e") ("F" / "f") ("E" / "e") ("R" / "r") ("E" / "e") ("N" / "n") ("C" / "c") ("E" / "e") identGuard) as str) as tREFERENCE
|
|
92
|
+
tREMOVE = ((("R" / "r") ("E" / "e") ("M" / "m") ("O" / "o") ("V" / "v") ("E" / "e") identGuard) as str) as tREMOVE
|
|
93
|
+
tRENAMED = ((("R" / "r") ("E" / "e") ("N" / "n") ("A" / "a") ("M" / "m") ("E" / "e") ("D" / "d") identGuard) as str) as tRENAMED
|
|
94
|
+
tREPEAT = ((("R" / "r") ("E" / "e") ("P" / "p") ("E" / "e") ("A" / "a") ("T" / "t") identGuard) as str) as tREPEAT
|
|
95
|
+
tRETURN = ((("R" / "r") ("E" / "e") ("T" / "t") ("U" / "u") ("R" / "r") ("N" / "n") identGuard) as str) as tRETURN
|
|
96
|
+
tROLESOF = ((("R" / "r") ("O" / "o") ("L" / "l") ("E" / "e") ("S" / "s") ("O" / "o") ("F" / "f") identGuard) as str) as tROLESOF
|
|
97
|
+
tRULE = ((("R" / "r") ("U" / "u") ("L" / "l") ("E" / "e") identGuard) as str) as tRULE
|
|
98
|
+
tSCHEMA = ((("S" / "s") ("C" / "c") ("H" / "h") ("E" / "e") ("M" / "m") ("A" / "a") identGuard) as str) as tSCHEMA
|
|
99
|
+
tSELECT = ((("S" / "s") ("E" / "e") ("L" / "l") ("E" / "e") ("C" / "c") ("T" / "t") identGuard) as str) as tSELECT
|
|
100
|
+
tSELF = ((("S" / "s") ("E" / "e") ("L" / "l") ("F" / "f") identGuard) as str) as tSELF
|
|
101
|
+
tSET = ((("S" / "s") ("E" / "e") ("T" / "t") identGuard) as str) as tSET
|
|
102
|
+
tSIN = ((("S" / "s") ("I" / "i") ("N" / "n") identGuard) as str) as tSIN
|
|
103
|
+
tSIZEOF = ((("S" / "s") ("I" / "i") ("Z" / "z") ("E" / "e") ("O" / "o") ("F" / "f") identGuard) as str) as tSIZEOF
|
|
104
|
+
tSKIP = ((("S" / "s") ("K" / "k") ("I" / "i") ("P" / "p") identGuard) as str) as tSKIP
|
|
105
|
+
tSQRT = ((("S" / "s") ("Q" / "q") ("R" / "r") ("T" / "t") identGuard) as str) as tSQRT
|
|
106
|
+
tSTRING = ((("S" / "s") ("T" / "t") ("R" / "r") ("I" / "i") ("N" / "n") ("G" / "g") identGuard) as str) as tSTRING
|
|
107
|
+
tSUBTYPE = ((("S" / "s") ("U" / "u") ("B" / "b") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tSUBTYPE
|
|
108
|
+
tSUBTYPE_CONSTRAINT = ((("S" / "s") ("U" / "u") ("B" / "b") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") "_" ("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("R" / "r") ("A" / "a") ("I" / "i") ("N" / "n") ("T" / "t") identGuard) as str) as tSUBTYPE_CONSTRAINT
|
|
109
|
+
tSUPERTYPE = ((("S" / "s") ("U" / "u") ("P" / "p") ("E" / "e") ("R" / "r") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tSUPERTYPE
|
|
110
|
+
tTAN = ((("T" / "t") ("A" / "a") ("N" / "n") identGuard) as str) as tTAN
|
|
111
|
+
tTHEN = ((("T" / "t") ("H" / "h") ("E" / "e") ("N" / "n") identGuard) as str) as tTHEN
|
|
112
|
+
tTO = ((("T" / "t") ("O" / "o") identGuard) as str) as tTO
|
|
113
|
+
tTRUE = ((("T" / "t") ("R" / "r") ("U" / "u") ("E" / "e") identGuard) as str) as tTRUE
|
|
114
|
+
tTYPE = ((("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tTYPE
|
|
115
|
+
tTYPEOF = ((("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") ("O" / "o") ("F" / "f") identGuard) as str) as tTYPEOF
|
|
116
|
+
tTOTAL_OVER = ((("T" / "t") ("O" / "o") ("T" / "t") ("A" / "a") ("L" / "l") "_" ("O" / "o") ("V" / "v") ("E" / "e") ("R" / "r") identGuard) as str) as tTOTAL_OVER
|
|
117
|
+
tUNIQUE = ((("U" / "u") ("N" / "n") ("I" / "i") ("Q" / "q") ("U" / "u") ("E" / "e") identGuard) as str) as tUNIQUE
|
|
118
|
+
tUNKNOWN = ((("U" / "u") ("N" / "n") ("K" / "k") ("N" / "n") ("O" / "o") ("W" / "w") ("N" / "n") identGuard) as str) as tUNKNOWN
|
|
119
|
+
tUNTIL = ((("U" / "u") ("N" / "n") ("T" / "t") ("I" / "i") ("L" / "l") identGuard) as str) as tUNTIL
|
|
120
|
+
tUSE = ((("U" / "u") ("S" / "s") ("E" / "e") identGuard) as str) as tUSE
|
|
121
|
+
tUSEDIN = ((("U" / "u") ("S" / "s") ("E" / "e") ("D" / "d") ("I" / "i") ("N" / "n") identGuard) as str) as tUSEDIN
|
|
122
|
+
tVALUE = ((("V" / "v") ("A" / "a") ("L" / "l") ("U" / "u") ("E" / "e") identGuard) as str) as tVALUE
|
|
123
|
+
tVALUE_IN = ((("V" / "v") ("A" / "a") ("L" / "l") ("U" / "u") ("E" / "e") "_" ("I" / "i") ("N" / "n") identGuard) as str) as tVALUE_IN
|
|
124
|
+
tVALUE_UNIQUE = ((("V" / "v") ("A" / "a") ("L" / "l") ("U" / "u") ("E" / "e") "_" ("U" / "u") ("N" / "n") ("I" / "i") ("Q" / "q") ("U" / "u") ("E" / "e") identGuard) as str) as tVALUE_UNIQUE
|
|
125
|
+
tVAR = ((("V" / "v") ("A" / "a") ("R" / "r") identGuard) as str) as tVAR
|
|
126
|
+
tWITH = ((("W" / "w") ("I" / "i") ("T" / "t") ("H" / "h") identGuard) as str) as tWITH
|
|
127
|
+
tWHERE = ((("W" / "w") ("H" / "h") ("E" / "e") ("R" / "r") ("E" / "e") identGuard) as str) as tWHERE
|
|
128
|
+
tWHILE = ((("W" / "w") ("H" / "h") ("I" / "i") ("L" / "l") ("E" / "e") identGuard) as str) as tWHILE
|
|
129
|
+
tXOR = ((("X" / "x") ("O" / "o") ("R" / "r") identGuard) as str) as tXOR
|
|
130
|
+
|
|
131
|
+
kwAny = tABS / tABSTRACT / tACOS / tAGGREGATE / tALIAS / tAND / tANDOR / tARRAY / tAS / tASIN / tATAN / tBAG / tBASED_ON / tBEGIN / tBINARY / tBLENGTH / tBOOLEAN / tBY / tCASE / tCONSTANT / tCONST_E / tCOS / tDERIVE / tDIV / tELSE / tEND / tEND_ALIAS / tEND_CASE / tEND_CONSTANT / tEND_ENTITY / tEND_FUNCTION / tEND_IF / tEND_LOCAL / tEND_PROCEDURE / tEND_REPEAT / tEND_RULE / tEND_SCHEMA / tEND_SUBTYPE_CONSTRAINT / tEND_TYPE / tENTITY / tENUMERATION / tESCAPE / tEXISTS / tEXP / tEXTENSIBLE / tFALSE / tFIXED / tFOR / tFORMAT / tFROM / tFUNCTION / tGENERIC_ENTITY / tGENERIC / tHIBOUND / tHIINDEX / tIF / tIN / tINSERT / tINTEGER / tINVERSE / tLENGTH / tLIKE / tLIST / tLOBOUND / tLOCAL / tLOG / tLOG10 / tLOG2 / tLOGICAL / tLOINDEX / tMOD / tNOT / tNUMBER / tNVL / tODD / tOF / tONEOF / tOPTIONAL / tOR / tOTHERWISE / tPI / tPROCEDURE / tQUERY / tREAL / tREFERENCE / tREMOVE / tRENAMED / tREPEAT / tRETURN / tROLESOF / tRULE / tSCHEMA / tSELECT / tSELF / tSET / tSIN / tSIZEOF / tSKIP / tSQRT / tSTRING / tSUBTYPE / tSUBTYPE_CONSTRAINT / tSUPERTYPE / tTAN / tTHEN / tTO / tTRUE / tTYPE / tTYPEOF / tTOTAL_OVER / tUNIQUE / tUNKNOWN / tUNTIL / tUSE / tUSEDIN / tVALUE / tVALUE_IN / tVALUE_UNIQUE / tVAR / tWITH / tWHERE / tWHILE / tXOR
|
|
132
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# EXPRESS scalar terminals. simpleId guards against every keyword
|
|
2
|
+
# (express_keywords.kwAny); strings bind their full span.
|
|
3
|
+
use express_keywords
|
|
4
|
+
|
|
5
|
+
grammar ExpressLiterals version "0.1.0" edition 2 {
|
|
6
|
+
digit = %x30-39
|
|
7
|
+
digits = 1*%x30-39
|
|
8
|
+
# One quantified class run (parsanol GH-69: a single Re consumes the
|
|
9
|
+
# whole identifier in one step), guarded against every keyword.
|
|
10
|
+
simpleId = (!express_keywords.kwAny ((%x41-5A / %x61-7A / "_") *(%x41-5A / %x61-7A / %x30-39 / "_")) as str) as simpleId
|
|
11
|
+
simpleStringLiteral = ("'" (*(!"'" %x01-10FFFF)) "'") as simpleStringLiteral
|
|
12
|
+
octet = (%x30-39 / %x41-46 / %x61-66) (%x30-39 / %x41-46 / %x61-66)
|
|
13
|
+
encodedStringLiteral = ("'" octet octet octet octet "'") as encodedStringLiteral
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# EXPRESS operator terminals (cstr(lit).as(name); trivia rides the skip).
|
|
2
|
+
# Longest-first ordering applies at every alternation site.
|
|
3
|
+
grammar ExpressOperators version "0.1.0" edition 2 {
|
|
4
|
+
op_asterisk = ("*" as str) as op_asterisk
|
|
5
|
+
op_colon = (":" as str) as op_colon
|
|
6
|
+
op_colon_equals_colon = (":=:" as str) as op_colon_equals_colon
|
|
7
|
+
op_colon_less_greater_colon = (":<>:" as str) as op_colon_less_greater_colon
|
|
8
|
+
op_comma = ("," as str) as op_comma
|
|
9
|
+
op_decl = (":=" as str) as op_decl
|
|
10
|
+
op_delim = (";" as str) as op_delim
|
|
11
|
+
op_double_asterisk = ("**" as str) as op_double_asterisk
|
|
12
|
+
op_double_backslash = (%x5C as str) as op_double_backslash
|
|
13
|
+
op_double_pipe = ("||" as str) as op_double_pipe
|
|
14
|
+
op_equals = ("=" as str) as op_equals
|
|
15
|
+
op_greater_equal = (">=" as str) as op_greater_equal
|
|
16
|
+
op_greater_than = (">" as str) as op_greater_than
|
|
17
|
+
op_leftbracket = ("[" as str) as op_leftbracket
|
|
18
|
+
op_left_curly_brace = ("{" as str) as op_left_curly_brace
|
|
19
|
+
op_leftparen = ("(" as str) as op_leftparen
|
|
20
|
+
op_less_equal = ("<=" as str) as op_less_equal
|
|
21
|
+
op_less_greater = ("<>" as str) as op_less_greater
|
|
22
|
+
op_less_than = ("<" as str) as op_less_than
|
|
23
|
+
op_minus = ("-" as str) as op_minus
|
|
24
|
+
op_period = ("." as str) as op_period
|
|
25
|
+
op_pipe = ("|" as str) as op_pipe
|
|
26
|
+
op_plus = ("+" as str) as op_plus
|
|
27
|
+
op_query_begin = ("<*" as str) as op_query_begin
|
|
28
|
+
op_query_end = ("*>" as str) as op_query_end
|
|
29
|
+
op_question_mark = ("?" as str) as op_question_mark
|
|
30
|
+
op_rightbracket = ("]" as str) as op_rightbracket
|
|
31
|
+
op_right_curly_brace = ("}" as str) as op_right_curly_brace
|
|
32
|
+
op_rightparen = (")" as str) as op_rightparen
|
|
33
|
+
op_slash = ("/" as str) as op_slash
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# EXPRESS remark terminals: product data, NOT trivia. RemarkScanner
|
|
2
|
+
# attaches tail remarks backward; the DSL's shapes are preserved exactly
|
|
3
|
+
# (including the (*) empty-remark tolerance, issue #126).
|
|
4
|
+
grammar ExpressRemarks version "0.1.0" edition 2 {
|
|
5
|
+
# (*): the 3-character empty embedded remark — opener and closer share
|
|
6
|
+
# the star (technically invalid per ISO 10303-11 §7.1.6; accepted for
|
|
7
|
+
# robustness). Otherwise (* ... *) with nesting.
|
|
8
|
+
embeddedRemark = {
|
|
9
|
+
(
|
|
10
|
+
"(*)"
|
|
11
|
+
/ ("(*" (*(!("*)") (embeddedRemark / %x01-10FFFF)) "*)"))
|
|
12
|
+
) as embeddedRemark
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# -- to end of line; the newline is optional at EOF.
|
|
16
|
+
tailRemark = {
|
|
17
|
+
("--" (*(!("%x0A") %x01-10FFFF)) [("%x0A")]) as tailRemark
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# EXPRESS structural statements — first vertical slice. Each rule is
|
|
2
|
+
# translated from lib/expressir/express/grammar/parser.rb; the corpus
|
|
3
|
+
# diff loop arbitrates tree shapes as bodies land.
|
|
4
|
+
use express_keywords
|
|
5
|
+
|
|
6
|
+
use express_operators
|
|
7
|
+
|
|
8
|
+
grammar ExpressStructure version "0.1.0" edition 2 {
|
|
9
|
+
# (tSKIP >> op_delim).as(:skipStmt)
|
|
10
|
+
skipStmt = (express_keywords.tSKIP express_operators.op_delim) as skipStmt
|
|
11
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generates the keyword-terminal fragment of express.parg from the DSL's
|
|
4
|
+
# KEYWORDS list (lib/expressir/express/grammar/parser.rb). Each DSL rule
|
|
5
|
+
# rule(:tKW) { cts(keyword_rule(KW).as(:str)).as(tKW) }
|
|
6
|
+
# is case-insensitive KW with a trailing identifier-character guard:
|
|
7
|
+
# tKW = (ci(KW)) as tKW
|
|
8
|
+
# with ci() expanded per character to ("A" / "a") pairs and the guard
|
|
9
|
+
# !(letter / digit / "_") appended once per keyword.
|
|
10
|
+
|
|
11
|
+
KEYWORDS = %i[
|
|
12
|
+
ABS ABSTRACT ACOS AGGREGATE ALIAS AND ANDOR ARRAY AS ASIN ATAN BAG BASED_ON
|
|
13
|
+
BEGIN BINARY BLENGTH BOOLEAN BY CASE CONSTANT CONST_E COS DERIVE DIV ELSE
|
|
14
|
+
END END_ALIAS END_CASE END_CONSTANT END_ENTITY END_FUNCTION END_IF
|
|
15
|
+
END_LOCAL END_PROCEDURE END_REPEAT END_RULE END_SCHEMA
|
|
16
|
+
END_SUBTYPE_CONSTRAINT END_TYPE ENTITY ENUMERATION ESCAPE EXISTS EXP
|
|
17
|
+
EXTENSIBLE FALSE FIXED FOR FORMAT FROM FUNCTION GENERIC_ENTITY
|
|
18
|
+
GENERIC HIBOUND HIINDEX IF IN INSERT INTEGER INVERSE LENGTH LIKE LIST LOBOUND
|
|
19
|
+
LOCAL LOG LOG10 LOG2 LOGICAL LOINDEX MOD NOT NUMBER NVL ODD OF ONEOF OPTIONAL
|
|
20
|
+
OR OTHERWISE PI PROCEDURE QUERY REAL REFERENCE REMOVE RENAMED REPEAT RETURN
|
|
21
|
+
ROLESOF RULE SCHEMA SELECT SELF SET SIN SIZEOF SKIP SQRT STRING SUBTYPE
|
|
22
|
+
SUBTYPE_CONSTRAINT SUPERTYPE TAN THEN TO TRUE TYPE TYPEOF TOTAL_OVER UNIQUE
|
|
23
|
+
UNKNOWN UNTIL USE USEDIN VALUE VALUE_IN VALUE_UNIQUE VAR WITH WHERE WHILE
|
|
24
|
+
XOR
|
|
25
|
+
].freeze
|
|
26
|
+
|
|
27
|
+
# PARG text for one case-insensitive character (literal pair or single).
|
|
28
|
+
def ci_char(char)
|
|
29
|
+
return "\"#{char}\"" unless char.match?(/[a-zA-Z]/)
|
|
30
|
+
|
|
31
|
+
"(\"#{char.upcase}\" / \"#{char.downcase}\")"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def parg_name(sym)
|
|
35
|
+
# Underscored keywords keep their underscore (BASED_ON → tBASED_ON);
|
|
36
|
+
# CONST_E keeps the E; all names are valid PARG idents.
|
|
37
|
+
"t#{sym}"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
out = []
|
|
41
|
+
out << "# --- keyword terminals (generated by generate-terminals.rb; do not"
|
|
42
|
+
out << "# hand-edit — rerun the script instead) ---"
|
|
43
|
+
out << "# The trailing-identifier guard: a keyword must not be followed by"
|
|
44
|
+
out << "# a letter, digit, or underscore (the DSL's match[a-zA-Z0-9_].absent?)."
|
|
45
|
+
out << "identGuard = !(%x41-5A / %x61-7A / %x30-39 / \"_\")"
|
|
46
|
+
KEYWORDS.each do |kw|
|
|
47
|
+
body = kw.to_s.chars.map { |c| ci_char(c) }.join(" ")
|
|
48
|
+
out << "#{parg_name(kw)} = ((#{body} identGuard) as str) as #{parg_name(kw)}"
|
|
49
|
+
end
|
|
50
|
+
puts out.join("\n")
|
|
51
|
+
|
|
52
|
+
# The DSL's anyKeyword = KEYWORDS.inject(:|) — the ordered union of all
|
|
53
|
+
# keyword rules (the list order is longest-first within each family).
|
|
54
|
+
puts
|
|
55
|
+
puts "kwAny = #{KEYWORDS.map { |kw| parg_name(kw) }.join(' / ')}"
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# --- keyword terminals (generated by generate-terminals.rb; do not
|
|
2
|
+
# hand-edit — rerun the script instead) ---
|
|
3
|
+
# The trailing-identifier guard: a keyword must not be followed by
|
|
4
|
+
# a letter, digit, or underscore (the DSL's match[a-zA-Z0-9_].absent?).
|
|
5
|
+
identGuard = !(%x41-5A / %x61-7A / %x30-39 / "_")
|
|
6
|
+
tABS = ((("A" / "a") ("B" / "b") ("S" / "s") identGuard) as str) as tABS
|
|
7
|
+
tABSTRACT = ((("A" / "a") ("B" / "b") ("S" / "s") ("T" / "t") ("R" / "r") ("A" / "a") ("C" / "c") ("T" / "t") identGuard) as str) as tABSTRACT
|
|
8
|
+
tACOS = ((("A" / "a") ("C" / "c") ("O" / "o") ("S" / "s") identGuard) as str) as tACOS
|
|
9
|
+
tAGGREGATE = ((("A" / "a") ("G" / "g") ("G" / "g") ("R" / "r") ("E" / "e") ("G" / "g") ("A" / "a") ("T" / "t") ("E" / "e") identGuard) as str) as tAGGREGATE
|
|
10
|
+
tALIAS = ((("A" / "a") ("L" / "l") ("I" / "i") ("A" / "a") ("S" / "s") identGuard) as str) as tALIAS
|
|
11
|
+
tAND = ((("A" / "a") ("N" / "n") ("D" / "d") identGuard) as str) as tAND
|
|
12
|
+
tANDOR = ((("A" / "a") ("N" / "n") ("D" / "d") ("O" / "o") ("R" / "r") identGuard) as str) as tANDOR
|
|
13
|
+
tARRAY = ((("A" / "a") ("R" / "r") ("R" / "r") ("A" / "a") ("Y" / "y") identGuard) as str) as tARRAY
|
|
14
|
+
tAS = ((("A" / "a") ("S" / "s") identGuard) as str) as tAS
|
|
15
|
+
tASIN = ((("A" / "a") ("S" / "s") ("I" / "i") ("N" / "n") identGuard) as str) as tASIN
|
|
16
|
+
tATAN = ((("A" / "a") ("T" / "t") ("A" / "a") ("N" / "n") identGuard) as str) as tATAN
|
|
17
|
+
tBAG = ((("B" / "b") ("A" / "a") ("G" / "g") identGuard) as str) as tBAG
|
|
18
|
+
tBASED_ON = ((("B" / "b") ("A" / "a") ("S" / "s") ("E" / "e") ("D" / "d") "_" ("O" / "o") ("N" / "n") identGuard) as str) as tBASED_ON
|
|
19
|
+
tBEGIN = ((("B" / "b") ("E" / "e") ("G" / "g") ("I" / "i") ("N" / "n") identGuard) as str) as tBEGIN
|
|
20
|
+
tBINARY = ((("B" / "b") ("I" / "i") ("N" / "n") ("A" / "a") ("R" / "r") ("Y" / "y") identGuard) as str) as tBINARY
|
|
21
|
+
tBLENGTH = ((("B" / "b") ("L" / "l") ("E" / "e") ("N" / "n") ("G" / "g") ("T" / "t") ("H" / "h") identGuard) as str) as tBLENGTH
|
|
22
|
+
tBOOLEAN = ((("B" / "b") ("O" / "o") ("O" / "o") ("L" / "l") ("E" / "e") ("A" / "a") ("N" / "n") identGuard) as str) as tBOOLEAN
|
|
23
|
+
tBY = ((("B" / "b") ("Y" / "y") identGuard) as str) as tBY
|
|
24
|
+
tCASE = ((("C" / "c") ("A" / "a") ("S" / "s") ("E" / "e") identGuard) as str) as tCASE
|
|
25
|
+
tCONSTANT = ((("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("A" / "a") ("N" / "n") ("T" / "t") identGuard) as str) as tCONSTANT
|
|
26
|
+
tCONST_E = ((("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") "_" ("E" / "e") identGuard) as str) as tCONST_E
|
|
27
|
+
tCOS = ((("C" / "c") ("O" / "o") ("S" / "s") identGuard) as str) as tCOS
|
|
28
|
+
tDERIVE = ((("D" / "d") ("E" / "e") ("R" / "r") ("I" / "i") ("V" / "v") ("E" / "e") identGuard) as str) as tDERIVE
|
|
29
|
+
tDIV = ((("D" / "d") ("I" / "i") ("V" / "v") identGuard) as str) as tDIV
|
|
30
|
+
tELSE = ((("E" / "e") ("L" / "l") ("S" / "s") ("E" / "e") identGuard) as str) as tELSE
|
|
31
|
+
tEND = ((("E" / "e") ("N" / "n") ("D" / "d") identGuard) as str) as tEND
|
|
32
|
+
tEND_ALIAS = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("A" / "a") ("L" / "l") ("I" / "i") ("A" / "a") ("S" / "s") identGuard) as str) as tEND_ALIAS
|
|
33
|
+
tEND_CASE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("C" / "c") ("A" / "a") ("S" / "s") ("E" / "e") identGuard) as str) as tEND_CASE
|
|
34
|
+
tEND_CONSTANT = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("A" / "a") ("N" / "n") ("T" / "t") identGuard) as str) as tEND_CONSTANT
|
|
35
|
+
tEND_ENTITY = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("E" / "e") ("N" / "n") ("T" / "t") ("I" / "i") ("T" / "t") ("Y" / "y") identGuard) as str) as tEND_ENTITY
|
|
36
|
+
tEND_FUNCTION = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("F" / "f") ("U" / "u") ("N" / "n") ("C" / "c") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") identGuard) as str) as tEND_FUNCTION
|
|
37
|
+
tEND_IF = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("I" / "i") ("F" / "f") identGuard) as str) as tEND_IF
|
|
38
|
+
tEND_LOCAL = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("L" / "l") ("O" / "o") ("C" / "c") ("A" / "a") ("L" / "l") identGuard) as str) as tEND_LOCAL
|
|
39
|
+
tEND_PROCEDURE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("P" / "p") ("R" / "r") ("O" / "o") ("C" / "c") ("E" / "e") ("D" / "d") ("U" / "u") ("R" / "r") ("E" / "e") identGuard) as str) as tEND_PROCEDURE
|
|
40
|
+
tEND_REPEAT = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("R" / "r") ("E" / "e") ("P" / "p") ("E" / "e") ("A" / "a") ("T" / "t") identGuard) as str) as tEND_REPEAT
|
|
41
|
+
tEND_RULE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("R" / "r") ("U" / "u") ("L" / "l") ("E" / "e") identGuard) as str) as tEND_RULE
|
|
42
|
+
tEND_SCHEMA = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("S" / "s") ("C" / "c") ("H" / "h") ("E" / "e") ("M" / "m") ("A" / "a") identGuard) as str) as tEND_SCHEMA
|
|
43
|
+
tEND_SUBTYPE_CONSTRAINT = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("S" / "s") ("U" / "u") ("B" / "b") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") "_" ("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("R" / "r") ("A" / "a") ("I" / "i") ("N" / "n") ("T" / "t") identGuard) as str) as tEND_SUBTYPE_CONSTRAINT
|
|
44
|
+
tEND_TYPE = ((("E" / "e") ("N" / "n") ("D" / "d") "_" ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tEND_TYPE
|
|
45
|
+
tENTITY = ((("E" / "e") ("N" / "n") ("T" / "t") ("I" / "i") ("T" / "t") ("Y" / "y") identGuard) as str) as tENTITY
|
|
46
|
+
tENUMERATION = ((("E" / "e") ("N" / "n") ("U" / "u") ("M" / "m") ("E" / "e") ("R" / "r") ("A" / "a") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") identGuard) as str) as tENUMERATION
|
|
47
|
+
tESCAPE = ((("E" / "e") ("S" / "s") ("C" / "c") ("A" / "a") ("P" / "p") ("E" / "e") identGuard) as str) as tESCAPE
|
|
48
|
+
tEXISTS = ((("E" / "e") ("X" / "x") ("I" / "i") ("S" / "s") ("T" / "t") ("S" / "s") identGuard) as str) as tEXISTS
|
|
49
|
+
tEXP = ((("E" / "e") ("X" / "x") ("P" / "p") identGuard) as str) as tEXP
|
|
50
|
+
tEXTENSIBLE = ((("E" / "e") ("X" / "x") ("T" / "t") ("E" / "e") ("N" / "n") ("S" / "s") ("I" / "i") ("B" / "b") ("L" / "l") ("E" / "e") identGuard) as str) as tEXTENSIBLE
|
|
51
|
+
tFALSE = ((("F" / "f") ("A" / "a") ("L" / "l") ("S" / "s") ("E" / "e") identGuard) as str) as tFALSE
|
|
52
|
+
tFIXED = ((("F" / "f") ("I" / "i") ("X" / "x") ("E" / "e") ("D" / "d") identGuard) as str) as tFIXED
|
|
53
|
+
tFOR = ((("F" / "f") ("O" / "o") ("R" / "r") identGuard) as str) as tFOR
|
|
54
|
+
tFORMAT = ((("F" / "f") ("O" / "o") ("R" / "r") ("M" / "m") ("A" / "a") ("T" / "t") identGuard) as str) as tFORMAT
|
|
55
|
+
tFROM = ((("F" / "f") ("R" / "r") ("O" / "o") ("M" / "m") identGuard) as str) as tFROM
|
|
56
|
+
tFUNCTION = ((("F" / "f") ("U" / "u") ("N" / "n") ("C" / "c") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") identGuard) as str) as tFUNCTION
|
|
57
|
+
tGENERIC_ENTITY = ((("G" / "g") ("E" / "e") ("N" / "n") ("E" / "e") ("R" / "r") ("I" / "i") ("C" / "c") "_" ("E" / "e") ("N" / "n") ("T" / "t") ("I" / "i") ("T" / "t") ("Y" / "y") identGuard) as str) as tGENERIC_ENTITY
|
|
58
|
+
tGENERIC = ((("G" / "g") ("E" / "e") ("N" / "n") ("E" / "e") ("R" / "r") ("I" / "i") ("C" / "c") identGuard) as str) as tGENERIC
|
|
59
|
+
tHIBOUND = ((("H" / "h") ("I" / "i") ("B" / "b") ("O" / "o") ("U" / "u") ("N" / "n") ("D" / "d") identGuard) as str) as tHIBOUND
|
|
60
|
+
tHIINDEX = ((("H" / "h") ("I" / "i") ("I" / "i") ("N" / "n") ("D" / "d") ("E" / "e") ("X" / "x") identGuard) as str) as tHIINDEX
|
|
61
|
+
tIF = ((("I" / "i") ("F" / "f") identGuard) as str) as tIF
|
|
62
|
+
tIN = ((("I" / "i") ("N" / "n") identGuard) as str) as tIN
|
|
63
|
+
tINSERT = ((("I" / "i") ("N" / "n") ("S" / "s") ("E" / "e") ("R" / "r") ("T" / "t") identGuard) as str) as tINSERT
|
|
64
|
+
tINTEGER = ((("I" / "i") ("N" / "n") ("T" / "t") ("E" / "e") ("G" / "g") ("E" / "e") ("R" / "r") identGuard) as str) as tINTEGER
|
|
65
|
+
tINVERSE = ((("I" / "i") ("N" / "n") ("V" / "v") ("E" / "e") ("R" / "r") ("S" / "s") ("E" / "e") identGuard) as str) as tINVERSE
|
|
66
|
+
tLENGTH = ((("L" / "l") ("E" / "e") ("N" / "n") ("G" / "g") ("T" / "t") ("H" / "h") identGuard) as str) as tLENGTH
|
|
67
|
+
tLIKE = ((("L" / "l") ("I" / "i") ("K" / "k") ("E" / "e") identGuard) as str) as tLIKE
|
|
68
|
+
tLIST = ((("L" / "l") ("I" / "i") ("S" / "s") ("T" / "t") identGuard) as str) as tLIST
|
|
69
|
+
tLOBOUND = ((("L" / "l") ("O" / "o") ("B" / "b") ("O" / "o") ("U" / "u") ("N" / "n") ("D" / "d") identGuard) as str) as tLOBOUND
|
|
70
|
+
tLOCAL = ((("L" / "l") ("O" / "o") ("C" / "c") ("A" / "a") ("L" / "l") identGuard) as str) as tLOCAL
|
|
71
|
+
tLOG = ((("L" / "l") ("O" / "o") ("G" / "g") identGuard) as str) as tLOG
|
|
72
|
+
tLOG10 = ((("L" / "l") ("O" / "o") ("G" / "g") "1" "0" identGuard) as str) as tLOG10
|
|
73
|
+
tLOG2 = ((("L" / "l") ("O" / "o") ("G" / "g") "2" identGuard) as str) as tLOG2
|
|
74
|
+
tLOGICAL = ((("L" / "l") ("O" / "o") ("G" / "g") ("I" / "i") ("C" / "c") ("A" / "a") ("L" / "l") identGuard) as str) as tLOGICAL
|
|
75
|
+
tLOINDEX = ((("L" / "l") ("O" / "o") ("I" / "i") ("N" / "n") ("D" / "d") ("E" / "e") ("X" / "x") identGuard) as str) as tLOINDEX
|
|
76
|
+
tMOD = ((("M" / "m") ("O" / "o") ("D" / "d") identGuard) as str) as tMOD
|
|
77
|
+
tNOT = ((("N" / "n") ("O" / "o") ("T" / "t") identGuard) as str) as tNOT
|
|
78
|
+
tNUMBER = ((("N" / "n") ("U" / "u") ("M" / "m") ("B" / "b") ("E" / "e") ("R" / "r") identGuard) as str) as tNUMBER
|
|
79
|
+
tNVL = ((("N" / "n") ("V" / "v") ("L" / "l") identGuard) as str) as tNVL
|
|
80
|
+
tODD = ((("O" / "o") ("D" / "d") ("D" / "d") identGuard) as str) as tODD
|
|
81
|
+
tOF = ((("O" / "o") ("F" / "f") identGuard) as str) as tOF
|
|
82
|
+
tONEOF = ((("O" / "o") ("N" / "n") ("E" / "e") ("O" / "o") ("F" / "f") identGuard) as str) as tONEOF
|
|
83
|
+
tOPTIONAL = ((("O" / "o") ("P" / "p") ("T" / "t") ("I" / "i") ("O" / "o") ("N" / "n") ("A" / "a") ("L" / "l") identGuard) as str) as tOPTIONAL
|
|
84
|
+
tOR = ((("O" / "o") ("R" / "r") identGuard) as str) as tOR
|
|
85
|
+
tOTHERWISE = ((("O" / "o") ("T" / "t") ("H" / "h") ("E" / "e") ("R" / "r") ("W" / "w") ("I" / "i") ("S" / "s") ("E" / "e") identGuard) as str) as tOTHERWISE
|
|
86
|
+
tPI = ((("P" / "p") ("I" / "i") identGuard) as str) as tPI
|
|
87
|
+
tPROCEDURE = ((("P" / "p") ("R" / "r") ("O" / "o") ("C" / "c") ("E" / "e") ("D" / "d") ("U" / "u") ("R" / "r") ("E" / "e") identGuard) as str) as tPROCEDURE
|
|
88
|
+
tQUERY = ((("Q" / "q") ("U" / "u") ("E" / "e") ("R" / "r") ("Y" / "y") identGuard) as str) as tQUERY
|
|
89
|
+
tREAL = ((("R" / "r") ("E" / "e") ("A" / "a") ("L" / "l") identGuard) as str) as tREAL
|
|
90
|
+
tREFERENCE = ((("R" / "r") ("E" / "e") ("F" / "f") ("E" / "e") ("R" / "r") ("E" / "e") ("N" / "n") ("C" / "c") ("E" / "e") identGuard) as str) as tREFERENCE
|
|
91
|
+
tREMOVE = ((("R" / "r") ("E" / "e") ("M" / "m") ("O" / "o") ("V" / "v") ("E" / "e") identGuard) as str) as tREMOVE
|
|
92
|
+
tRENAMED = ((("R" / "r") ("E" / "e") ("N" / "n") ("A" / "a") ("M" / "m") ("E" / "e") ("D" / "d") identGuard) as str) as tRENAMED
|
|
93
|
+
tREPEAT = ((("R" / "r") ("E" / "e") ("P" / "p") ("E" / "e") ("A" / "a") ("T" / "t") identGuard) as str) as tREPEAT
|
|
94
|
+
tRETURN = ((("R" / "r") ("E" / "e") ("T" / "t") ("U" / "u") ("R" / "r") ("N" / "n") identGuard) as str) as tRETURN
|
|
95
|
+
tROLESOF = ((("R" / "r") ("O" / "o") ("L" / "l") ("E" / "e") ("S" / "s") ("O" / "o") ("F" / "f") identGuard) as str) as tROLESOF
|
|
96
|
+
tRULE = ((("R" / "r") ("U" / "u") ("L" / "l") ("E" / "e") identGuard) as str) as tRULE
|
|
97
|
+
tSCHEMA = ((("S" / "s") ("C" / "c") ("H" / "h") ("E" / "e") ("M" / "m") ("A" / "a") identGuard) as str) as tSCHEMA
|
|
98
|
+
tSELECT = ((("S" / "s") ("E" / "e") ("L" / "l") ("E" / "e") ("C" / "c") ("T" / "t") identGuard) as str) as tSELECT
|
|
99
|
+
tSELF = ((("S" / "s") ("E" / "e") ("L" / "l") ("F" / "f") identGuard) as str) as tSELF
|
|
100
|
+
tSET = ((("S" / "s") ("E" / "e") ("T" / "t") identGuard) as str) as tSET
|
|
101
|
+
tSIN = ((("S" / "s") ("I" / "i") ("N" / "n") identGuard) as str) as tSIN
|
|
102
|
+
tSIZEOF = ((("S" / "s") ("I" / "i") ("Z" / "z") ("E" / "e") ("O" / "o") ("F" / "f") identGuard) as str) as tSIZEOF
|
|
103
|
+
tSKIP = ((("S" / "s") ("K" / "k") ("I" / "i") ("P" / "p") identGuard) as str) as tSKIP
|
|
104
|
+
tSQRT = ((("S" / "s") ("Q" / "q") ("R" / "r") ("T" / "t") identGuard) as str) as tSQRT
|
|
105
|
+
tSTRING = ((("S" / "s") ("T" / "t") ("R" / "r") ("I" / "i") ("N" / "n") ("G" / "g") identGuard) as str) as tSTRING
|
|
106
|
+
tSUBTYPE = ((("S" / "s") ("U" / "u") ("B" / "b") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tSUBTYPE
|
|
107
|
+
tSUBTYPE_CONSTRAINT = ((("S" / "s") ("U" / "u") ("B" / "b") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") "_" ("C" / "c") ("O" / "o") ("N" / "n") ("S" / "s") ("T" / "t") ("R" / "r") ("A" / "a") ("I" / "i") ("N" / "n") ("T" / "t") identGuard) as str) as tSUBTYPE_CONSTRAINT
|
|
108
|
+
tSUPERTYPE = ((("S" / "s") ("U" / "u") ("P" / "p") ("E" / "e") ("R" / "r") ("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tSUPERTYPE
|
|
109
|
+
tTAN = ((("T" / "t") ("A" / "a") ("N" / "n") identGuard) as str) as tTAN
|
|
110
|
+
tTHEN = ((("T" / "t") ("H" / "h") ("E" / "e") ("N" / "n") identGuard) as str) as tTHEN
|
|
111
|
+
tTO = ((("T" / "t") ("O" / "o") identGuard) as str) as tTO
|
|
112
|
+
tTRUE = ((("T" / "t") ("R" / "r") ("U" / "u") ("E" / "e") identGuard) as str) as tTRUE
|
|
113
|
+
tTYPE = ((("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") identGuard) as str) as tTYPE
|
|
114
|
+
tTYPEOF = ((("T" / "t") ("Y" / "y") ("P" / "p") ("E" / "e") ("O" / "o") ("F" / "f") identGuard) as str) as tTYPEOF
|
|
115
|
+
tTOTAL_OVER = ((("T" / "t") ("O" / "o") ("T" / "t") ("A" / "a") ("L" / "l") "_" ("O" / "o") ("V" / "v") ("E" / "e") ("R" / "r") identGuard) as str) as tTOTAL_OVER
|
|
116
|
+
tUNIQUE = ((("U" / "u") ("N" / "n") ("I" / "i") ("Q" / "q") ("U" / "u") ("E" / "e") identGuard) as str) as tUNIQUE
|
|
117
|
+
tUNKNOWN = ((("U" / "u") ("N" / "n") ("K" / "k") ("N" / "n") ("O" / "o") ("W" / "w") ("N" / "n") identGuard) as str) as tUNKNOWN
|
|
118
|
+
tUNTIL = ((("U" / "u") ("N" / "n") ("T" / "t") ("I" / "i") ("L" / "l") identGuard) as str) as tUNTIL
|
|
119
|
+
tUSE = ((("U" / "u") ("S" / "s") ("E" / "e") identGuard) as str) as tUSE
|
|
120
|
+
tUSEDIN = ((("U" / "u") ("S" / "s") ("E" / "e") ("D" / "d") ("I" / "i") ("N" / "n") identGuard) as str) as tUSEDIN
|
|
121
|
+
tVALUE = ((("V" / "v") ("A" / "a") ("L" / "l") ("U" / "u") ("E" / "e") identGuard) as str) as tVALUE
|
|
122
|
+
tVALUE_IN = ((("V" / "v") ("A" / "a") ("L" / "l") ("U" / "u") ("E" / "e") "_" ("I" / "i") ("N" / "n") identGuard) as str) as tVALUE_IN
|
|
123
|
+
tVALUE_UNIQUE = ((("V" / "v") ("A" / "a") ("L" / "l") ("U" / "u") ("E" / "e") "_" ("U" / "u") ("N" / "n") ("I" / "i") ("Q" / "q") ("U" / "u") ("E" / "e") identGuard) as str) as tVALUE_UNIQUE
|
|
124
|
+
tVAR = ((("V" / "v") ("A" / "a") ("R" / "r") identGuard) as str) as tVAR
|
|
125
|
+
tWITH = ((("W" / "w") ("I" / "i") ("T" / "t") ("H" / "h") identGuard) as str) as tWITH
|
|
126
|
+
tWHERE = ((("W" / "w") ("H" / "h") ("E" / "e") ("R" / "r") ("E" / "e") identGuard) as str) as tWHERE
|
|
127
|
+
tWHILE = ((("W" / "w") ("H" / "h") ("I" / "i") ("L" / "l") ("E" / "e") identGuard) as str) as tWHILE
|
|
128
|
+
tXOR = ((("X" / "x") ("O" / "o") ("R" / "r") identGuard) as str) as tXOR
|
|
129
|
+
|
|
130
|
+
kwAny = tABS / tABSTRACT / tACOS / tAGGREGATE / tALIAS / tAND / tANDOR / tARRAY / tAS / tASIN / tATAN / tBAG / tBASED_ON / tBEGIN / tBINARY / tBLENGTH / tBOOLEAN / tBY / tCASE / tCONSTANT / tCONST_E / tCOS / tDERIVE / tDIV / tELSE / tEND / tEND_ALIAS / tEND_CASE / tEND_CONSTANT / tEND_ENTITY / tEND_FUNCTION / tEND_IF / tEND_LOCAL / tEND_PROCEDURE / tEND_REPEAT / tEND_RULE / tEND_SCHEMA / tEND_SUBTYPE_CONSTRAINT / tEND_TYPE / tENTITY / tENUMERATION / tESCAPE / tEXISTS / tEXP / tEXTENSIBLE / tFALSE / tFIXED / tFOR / tFORMAT / tFROM / tFUNCTION / tGENERIC_ENTITY / tGENERIC / tHIBOUND / tHIINDEX / tIF / tIN / tINSERT / tINTEGER / tINVERSE / tLENGTH / tLIKE / tLIST / tLOBOUND / tLOCAL / tLOG / tLOG10 / tLOG2 / tLOGICAL / tLOINDEX / tMOD / tNOT / tNUMBER / tNVL / tODD / tOF / tONEOF / tOPTIONAL / tOR / tOTHERWISE / tPI / tPROCEDURE / tQUERY / tREAL / tREFERENCE / tREMOVE / tRENAMED / tREPEAT / tRETURN / tROLESOF / tRULE / tSCHEMA / tSELECT / tSELF / tSET / tSIN / tSIZEOF / tSKIP / tSQRT / tSTRING / tSUBTYPE / tSUBTYPE_CONSTRAINT / tSUPERTYPE / tTAN / tTHEN / tTO / tTRUE / tTYPE / tTYPEOF / tTOTAL_OVER / tUNIQUE / tUNKNOWN / tUNTIL / tUSE / tUSEDIN / tVALUE / tVALUE_IN / tVALUE_UNIQUE / tVAR / tWITH / tWHERE / tWHILE / tXOR
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# --- literal terminals (hand-translated) ---
|
|
2
|
+
digit = %x30-39
|
|
3
|
+
digits = 1*%x30-39
|
|
4
|
+
# One quantified class run (parsanol GH-69: a single Re consumes the
|
|
5
|
+
# whole identifier in one step), guarded against every keyword.
|
|
6
|
+
simpleId = (!kwAny ((%x41-5A / %x61-7A / "_") *(%x41-5A / %x61-7A / %x30-39 / "_")) as str) as simpleId
|
|
7
|
+
simpleStringLiteral = ("'" (*(!"'" %x01-10FFFF)) "'") as simpleStringLiteral
|
|
8
|
+
octet = (%x30-39 / %x41-46 / %x61-66) (%x30-39 / %x41-46 / %x61-66)
|
|
9
|
+
encodedStringLiteral = ("'" octet octet octet octet "'") as encodedStringLiteral
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# --- operator terminals (cstr(lit).as(name); trivia rides the skip) ---
|
|
2
|
+
op_asterisk = ("*" as str) as op_asterisk
|
|
3
|
+
op_colon = (":" as str) as op_colon
|
|
4
|
+
op_colon_equals_colon = (":=:" as str) as op_colon_equals_colon
|
|
5
|
+
op_colon_less_greater_colon = (":<>:" as str) as op_colon_less_greater_colon
|
|
6
|
+
op_comma = ("," as str) as op_comma
|
|
7
|
+
op_decl = (":=" as str) as op_decl
|
|
8
|
+
op_delim = (";" as str) as op_delim
|
|
9
|
+
op_double_asterisk = ("**" as str) as op_double_asterisk
|
|
10
|
+
op_double_backslash = (%x5C as str) as op_double_backslash
|
|
11
|
+
op_double_pipe = ("||" as str) as op_double_pipe
|
|
12
|
+
op_equals = ("=" as str) as op_equals
|
|
13
|
+
op_greater_equal = (">=" as str) as op_greater_equal
|
|
14
|
+
op_greater_than = (">" as str) as op_greater_than
|
|
15
|
+
op_leftbracket = ("[" as str) as op_leftbracket
|
|
16
|
+
op_left_curly_brace = ("{" as str) as op_left_curly_brace
|
|
17
|
+
op_leftparen = ("(" as str) as op_leftparen
|
|
18
|
+
op_less_equal = ("<=" as str) as op_less_equal
|
|
19
|
+
op_less_greater = ("<>" as str) as op_less_greater
|
|
20
|
+
op_less_than = ("<" as str) as op_less_than
|
|
21
|
+
op_minus = ("-" as str) as op_minus
|
|
22
|
+
op_period = ("." as str) as op_period
|
|
23
|
+
op_pipe = ("|" as str) as op_pipe
|
|
24
|
+
op_plus = ("+" as str) as op_plus
|
|
25
|
+
op_query_begin = ("<*" as str) as op_query_begin
|
|
26
|
+
op_query_end = ("*>" as str) as op_query_end
|
|
27
|
+
op_question_mark = ("?" as str) as op_question_mark
|
|
28
|
+
op_rightbracket = ("]" as str) as op_rightbracket
|
|
29
|
+
op_right_curly_brace = ("}" as str) as op_right_curly_brace
|
|
30
|
+
op_rightparen = (")" as str) as op_rightparen
|
|
31
|
+
op_slash = ("/" as str) as op_slash
|
|
32
|
+
# ordered-union the DSL builds for the operators where alternatives
|
|
33
|
+
# appear: longest-first at every alternation site that references them
|
|
34
|
+
# (op_colon_equals_colon / op_colon etc.) — the sites keep the DSL order.
|