Changed the definition of the compound constructs so they use "option".

This commit is contained in:
Christian Rinderknecht 2019-07-31 10:45:19 +02:00
parent 50c99ff71d
commit 5bc43fa430
19 changed files with 238 additions and 224 deletions

View File

@ -1,6 +1,6 @@
option(X) :=
option(item) :=
(**)
| X
| item
sep_or_term_list(item,sep) ::=
nsepseq(item,sep)
@ -8,34 +8,34 @@ sep_or_term_list(item,sep) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Inlines *)

View File

@ -15,34 +15,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Inlines *)

View File

@ -15,33 +15,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -15,33 +15,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -15,33 +15,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -15,33 +15,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -24,8 +24,7 @@ brackets(X) ::= LBRACKET X RBRACKET
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
option(nseq(X))
(* Non-empty sequence of items *)
@ -40,8 +39,7 @@ nsepseq(X,Sep) ::=
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
option(nsepseq(X,Sep))
(* Main *)

View File

@ -15,33 +15,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)

View File

@ -22,33 +22,34 @@ item_or_closing(item,sep,term) ::=
(* Compound constructs *)
par(X) ::= LPAR X RPAR
par(item) ::=
LPAR item RPAR
brackets(X) ::= LBRACKET X RBRACKET
brackets(item) ::=
LBRACKET item RBRACKET
(* Sequences *)
(* Possibly empty sequence of items *)
seq(X) ::=
(**)
| X seq(X)
seq(item) ::=
option(nseq(item))
(* Non-empty sequence of items *)
nseq(X) ::= X seq(X)
nseq(item) ::=
item seq(item)
(* Non-empty separated sequence of items *)
nsepseq(X,Sep) ::=
X
| X Sep nsepseq(X,Sep)
nsepseq(item,Sep) ::=
item
| item Sep nsepseq(item,Sep)
(* Possibly empy separated sequence of items *)
sepseq(X,Sep) ::=
(**)
| nsepseq(X,Sep)
sepseq(item,Sep) ::=
option(nsepseq(item,Sep))
(* Main *)