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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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