From 5bc43fa430eb7dde7b7da6f02299b72e70676394 Mon Sep 17 00:00:00 2001 From: Christian Rinderknecht Date: Wed, 31 Jul 2019 10:45:19 +0200 Subject: [PATCH] Changed the definition of the compound constructs so they use "option". --- src/parser/pascaligo/Doc/pascaligo_01.bnf | 30 +++++++++++------------ src/parser/pascaligo/Doc/pascaligo_02.bnf | 26 ++++++++++---------- src/parser/pascaligo/Doc/pascaligo_03.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_04.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_05.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_06.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_07.bnf | 6 ++--- src/parser/pascaligo/Doc/pascaligo_08.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_09.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_10.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_11.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_12.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_13.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_14.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_15.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_16.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_17.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_18.bnf | 25 ++++++++++--------- src/parser/pascaligo/Doc/pascaligo_19.bnf | 25 ++++++++++--------- 19 files changed, 238 insertions(+), 224 deletions(-) diff --git a/src/parser/pascaligo/Doc/pascaligo_01.bnf b/src/parser/pascaligo/Doc/pascaligo_01.bnf index 551d23d3e..7eeb63c1b 100644 --- a/src/parser/pascaligo/Doc/pascaligo_01.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_01.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_02.bnf b/src/parser/pascaligo/Doc/pascaligo_02.bnf index a91bbdaff..dd410f63c 100644 --- a/src/parser/pascaligo/Doc/pascaligo_02.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_02.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_03.bnf b/src/parser/pascaligo/Doc/pascaligo_03.bnf index 8f8f7b9ee..1f39f9dba 100644 --- a/src/parser/pascaligo/Doc/pascaligo_03.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_03.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_04.bnf b/src/parser/pascaligo/Doc/pascaligo_04.bnf index c53d68517..9b5b9cc66 100644 --- a/src/parser/pascaligo/Doc/pascaligo_04.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_04.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_05.bnf b/src/parser/pascaligo/Doc/pascaligo_05.bnf index 924a0ca30..1461f2a4c 100644 --- a/src/parser/pascaligo/Doc/pascaligo_05.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_05.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_06.bnf b/src/parser/pascaligo/Doc/pascaligo_06.bnf index 30323f057..caced433f 100644 --- a/src/parser/pascaligo/Doc/pascaligo_06.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_06.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_07.bnf b/src/parser/pascaligo/Doc/pascaligo_07.bnf index 263a64264..95d1be77a 100644 --- a/src/parser/pascaligo/Doc/pascaligo_07.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_07.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_08.bnf b/src/parser/pascaligo/Doc/pascaligo_08.bnf index 524c29d82..953341d69 100644 --- a/src/parser/pascaligo/Doc/pascaligo_08.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_08.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_09.bnf b/src/parser/pascaligo/Doc/pascaligo_09.bnf index dd10222dd..e570609c7 100644 --- a/src/parser/pascaligo/Doc/pascaligo_09.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_09.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_10.bnf b/src/parser/pascaligo/Doc/pascaligo_10.bnf index 90c390108..33fbe18f6 100644 --- a/src/parser/pascaligo/Doc/pascaligo_10.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_10.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_11.bnf b/src/parser/pascaligo/Doc/pascaligo_11.bnf index d0ddeaee5..0995cb0e7 100644 --- a/src/parser/pascaligo/Doc/pascaligo_11.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_11.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_12.bnf b/src/parser/pascaligo/Doc/pascaligo_12.bnf index 29711cd62..a69689f8d 100644 --- a/src/parser/pascaligo/Doc/pascaligo_12.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_12.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_13.bnf b/src/parser/pascaligo/Doc/pascaligo_13.bnf index 7a9c840ec..7bf49f9c4 100644 --- a/src/parser/pascaligo/Doc/pascaligo_13.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_13.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_14.bnf b/src/parser/pascaligo/Doc/pascaligo_14.bnf index 0bea4fd14..748bddb41 100644 --- a/src/parser/pascaligo/Doc/pascaligo_14.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_14.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_15.bnf b/src/parser/pascaligo/Doc/pascaligo_15.bnf index 7984d91f0..700ee4058 100644 --- a/src/parser/pascaligo/Doc/pascaligo_15.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_15.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_16.bnf b/src/parser/pascaligo/Doc/pascaligo_16.bnf index e1429f350..d826edc34 100644 --- a/src/parser/pascaligo/Doc/pascaligo_16.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_16.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_17.bnf b/src/parser/pascaligo/Doc/pascaligo_17.bnf index ae8a73add..af6dd9531 100644 --- a/src/parser/pascaligo/Doc/pascaligo_17.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_17.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_18.bnf b/src/parser/pascaligo/Doc/pascaligo_18.bnf index f98ac4cf5..7ad433713 100644 --- a/src/parser/pascaligo/Doc/pascaligo_18.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_18.bnf @@ -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 *) diff --git a/src/parser/pascaligo/Doc/pascaligo_19.bnf b/src/parser/pascaligo/Doc/pascaligo_19.bnf index 52916e821..ae1219062 100644 --- a/src/parser/pascaligo/Doc/pascaligo_19.bnf +++ b/src/parser/pascaligo/Doc/pascaligo_19.bnf @@ -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 *)