From d6dceeb50b90456afafc0ecb94c3329c2e68a62e Mon Sep 17 00:00:00 2001 From: grammarware Date: Wed, 3 Oct 2012 15:18:48 +0200 Subject: [PATCH] reviving the Grammar Tank; removing the Rascal grammar for the time being --- .gitignore | 1 + Makefile | 4 +- _dev/Makefile.y | 66 ++ _dev/format | 16 +- _dev/list2makefile.xslt | 4 +- _dev/list2xhtml.xslt | 6 +- _dev/tank.xml | 30 +- tank/fl/antlr.bgf | 82 +- tank/fl/antlr.bnf | 18 +- tank/fl/antlr.dms | 18 +- tank/fl/antlr.html | 32 +- tank/fl/antlr.rsc | 18 +- tank/fl/antlr.sdf | 18 +- tank/fl/dcg.html | 14 +- tank/fl/dcg.rsc | 16 +- tank/fl/ecore.html | 14 +- tank/fl/ecore.rsc | 6 +- tank/fl/{ecore2.bgf => emf.bgf} | 0 tank/fl/{ecore2.bnf => emf.bnf} | 0 tank/fl/{ecore2.dms => emf.dms} | 0 tank/fl/{ecore2.html => emf.html} | 14 +- tank/fl/{ecore2.rsc => emf.rsc} | 12 +- tank/fl/{ecore2.sdf => emf.sdf} | 0 tank/fl/jaxb.bgf | 6 +- tank/fl/jaxb.bnf | 6 +- tank/fl/jaxb.dms | 6 +- tank/fl/jaxb.html | 22 +- tank/fl/jaxb.rsc | 16 +- tank/fl/jaxb.sdf | 6 +- tank/fl/om.bgf | 8 +- tank/fl/om.bnf | 6 +- tank/fl/om.dms | 6 +- tank/fl/om.html | 22 +- tank/fl/om.rsc | 16 +- tank/fl/om.sdf | 6 +- tank/fl/sdf.html | 14 +- tank/fl/sdf.rsc | 16 +- tank/fl/txl.bgf | 132 ++- tank/fl/txl.html | 14 +- tank/fl/xml.bgf | 226 ----- tank/fl/xsd.html | 14 +- tank/fl/xsd.rsc | 10 +- tank/index.html | 95 +-- tank/metasyntax/bgf.bgf | 30 + tank/metasyntax/bgf.bnf | 2 + tank/metasyntax/bgf.dms | 2 + tank/metasyntax/bgf.html | 18 +- tank/metasyntax/bgf.rsc | 32 +- tank/metasyntax/bgf.sdf | 4 +- tank/metasyntax/bnf-sdf-correct.html | 14 +- tank/metasyntax/bnf-sdf.html | 14 +- tank/metasyntax/ebnf-bgf.html | 14 +- tank/metasyntax/ebnf-iso-1-generalize.html | 14 +- tank/metasyntax/ebnf-iso-1-post-extract.html | 14 +- tank/metasyntax/ebnf-iso-1-refactor.html | 14 +- tank/metasyntax/ebnf-iso-1.html | 14 +- tank/metasyntax/ebnf-iso-2-post-extract.html | 14 +- tank/metasyntax/ebnf-iso-2-refactor.html | 14 +- tank/metasyntax/ebnf-iso-2.html | 14 +- tank/metasyntax/ebnf-iso-3-post-extract.html | 14 +- tank/metasyntax/ebnf-iso-3-refactor.html | 14 +- tank/metasyntax/ebnf-iso-3.html | 14 +- tank/metasyntax/ebnf-sdf-correct.html | 14 +- tank/metasyntax/ebnf-sdf.html | 14 +- tank/metasyntax/lll-kort-reroot.prepared.html | 14 +- tank/metasyntax/lll-kort.bgf | 17 +- tank/metasyntax/lll-kort.bnf | 2 +- tank/metasyntax/lll-kort.dms | 5 +- tank/metasyntax/lll-kort.html | 16 +- tank/metasyntax/lll-kort.rsc | 5 +- tank/metasyntax/lll-kort.sdf | 5 +- tank/metasyntax/lll-ldta-reroot.prepared.html | 14 +- tank/metasyntax/lll-ldta.html | 14 +- tank/metasyntax/rascal-horizontalize.html | 72 -- tank/metasyntax/rascal.bgf | 1 - tank/metasyntax/rascal.bnf | 756 ----------------- tank/metasyntax/rascal.dms | 378 --------- tank/metasyntax/rascal.html | 779 ------------------ tank/metasyntax/rascal.rsc | 582 ------------- tank/metasyntax/rascal.sdf | 762 ----------------- tank/metasyntax/txl.html | 14 +- tank/metasyntax/yacc-refactor.html | 14 +- tank/metasyntax/yacc.html | 14 +- tank/tescol/00000.html | 14 +- tank/tescol/00000.rsc | 4 +- tank/tescol/00001.html | 14 +- tank/tescol/00010.html | 14 +- tank/tescol/00011.html | 14 +- tank/tescol/00100.html | 14 +- tank/tescol/00101.html | 14 +- tank/tescol/00110.html | 14 +- tank/tescol/00110.rsc | 2 +- tank/tescol/00111.html | 14 +- tank/tescol/01000.html | 14 +- tank/tescol/01001.html | 14 +- tank/tescol/01001.rsc | 4 +- tank/tescol/01010.html | 14 +- tank/tescol/01011.html | 14 +- tank/tescol/01100.html | 14 +- tank/tescol/01101.html | 14 +- tank/tescol/01110.html | 14 +- tank/tescol/01111.html | 14 +- tank/tescol/10000.html | 14 +- tank/tescol/10001.html | 14 +- tank/tescol/10001.rsc | 4 +- tank/tescol/10010.html | 14 +- tank/tescol/10011.html | 14 +- tank/tescol/10100.html | 14 +- tank/tescol/10101.html | 14 +- tank/tescol/10110.html | 14 +- tank/tescol/10111.html | 14 +- tank/tescol/10111.rsc | 2 +- tank/tescol/11000.html | 14 +- tank/tescol/11001.html | 14 +- tank/tescol/11001.rsc | 26 +- tank/tescol/11010.html | 14 +- tank/tescol/11011.html | 14 +- tank/tescol/11100.html | 14 +- tank/tescol/11101.html | 14 +- tank/tescol/11101.rsc | 2 +- tank/tescol/11110.html | 14 +- tank/tescol/11110.rsc | 8 +- tank/tescol/11111.html | 14 +- tank/tescol/reference.html | 14 +- 124 files changed, 1356 insertions(+), 3956 deletions(-) create mode 100644 .gitignore create mode 100644 _dev/Makefile.y rename tank/fl/{ecore2.bgf => emf.bgf} (100%) rename tank/fl/{ecore2.bnf => emf.bnf} (100%) rename tank/fl/{ecore2.dms => emf.dms} (100%) rename tank/fl/{ecore2.html => emf.html} (79%) rename tank/fl/{ecore2.rsc => emf.rsc} (83%) rename tank/fl/{ecore2.sdf => emf.sdf} (100%) delete mode 100644 tank/fl/xml.bgf delete mode 100644 tank/metasyntax/rascal-horizontalize.html delete mode 100644 tank/metasyntax/rascal.bgf delete mode 100644 tank/metasyntax/rascal.bnf delete mode 100644 tank/metasyntax/rascal.dms delete mode 100644 tank/metasyntax/rascal.html delete mode 100644 tank/metasyntax/rascal.rsc delete mode 100644 tank/metasyntax/rascal.sdf diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f18c18e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tmp.xml diff --git a/Makefile b/Makefile index 4764b5af..ec3ea1be 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ zooprj: tankprj: rm -f tank/*/* - cp ../topics/convergence/fl/snapshot/*.bgf tank/fl/ - cp ../topics/testing/gbtf/tests/tescol/*.bgf tank/tescol/ + cp ../slps/topics/convergence/xbgf/fl/snapshot/*.bgf tank/fl/ + cp ../slps/topics/testing/gbtf/tests/tescol/*.bgf tank/tescol/ chmod 644 tank/*/*.bgf xsltproc _dev/list2makefile.xslt _dev/tank.xml | grep -v 'tank/fl' | grep -v 'tank/tescol' > _dev/Makefile.y make -f _dev/Makefile.y diff --git a/_dev/Makefile.y b/_dev/Makefile.y new file mode 100644 index 00000000..b75a4577 --- /dev/null +++ b/_dev/Makefile.y @@ -0,0 +1,66 @@ +all: + _dev/format tank fl/antlr fl/antlr + _dev/format tank fl/dcg fl/dcg + _dev/format tank fl/sdf fl/sdf + _dev/format tank fl/txl fl/txl + _dev/format tank fl/ecore fl/ecore + _dev/format tank fl/emf fl/emf + _dev/format tank fl/xsd fl/xsd + _dev/format tank fl/om fl/om + _dev/format tank fl/jaxb fl/jaxb + cp ../slps/topics/grammars/metasyntax/bgf/grammar.bgf tank/metasyntax/bgf.bgf + _dev/format tank metasyntax/bgf metasyntax/bgf + cp ../slps/topics/grammars/metasyntax/bnf-sdf/grammar.bgf tank/metasyntax/bnf-sdf.bgf + _dev/format tank metasyntax/bnf-sdf metasyntax/bnf-sdf + cp ../slps/topics/grammars/metasyntax/ebnf-bgf/grammar.bgf tank/metasyntax/ebnf-bgf.bgf + _dev/format tank metasyntax/ebnf-bgf metasyntax/ebnf-bgf + cp ../slps/topics/grammars/metasyntax/ebnf-iso-1/grammar.bgf tank/metasyntax/ebnf-iso-1.bgf + _dev/format tank metasyntax/ebnf-iso-1 metasyntax/ebnf-iso-1 + cp ../slps/topics/grammars/metasyntax/ebnf-iso-2/grammar.bgf tank/metasyntax/ebnf-iso-2.bgf + _dev/format tank metasyntax/ebnf-iso-2 metasyntax/ebnf-iso-2 + cp ../slps/topics/grammars/metasyntax/ebnf-iso-3/grammar.bgf tank/metasyntax/ebnf-iso-3.bgf + _dev/format tank metasyntax/ebnf-iso-3 metasyntax/ebnf-iso-3 + cp ../slps/topics/grammars/metasyntax/ebnf-sdf/grammar.bgf tank/metasyntax/ebnf-sdf.bgf + _dev/format tank metasyntax/ebnf-sdf metasyntax/ebnf-sdf + cp ../slps/topics/grammars/metasyntax/lll-ldta/grammar.bgf tank/metasyntax/lll-ldta.bgf + _dev/format tank metasyntax/lll-ldta metasyntax/lll-ldta + cp ../slps/topics/grammars/metasyntax/lll-kort/grammar.bgf tank/metasyntax/lll-kort.bgf + _dev/format tank metasyntax/lll-kort metasyntax/lll-kort + cp ../slps/topics/grammars/metasyntax/txl/grammar.bgf tank/metasyntax/txl.bgf + _dev/format tank metasyntax/txl metasyntax/txl + cp ../slps/topics/grammars/metasyntax/yacc/grammar.bgf tank/metasyntax/yacc.bgf + _dev/format tank metasyntax/yacc metasyntax/yacc + _dev/format tank tescol/reference Reference + _dev/format tank tescol/00000 00000 + _dev/format tank tescol/00001 00001 + _dev/format tank tescol/00010 00010 + _dev/format tank tescol/00011 00011 + _dev/format tank tescol/00100 00100 + _dev/format tank tescol/00101 00101 + _dev/format tank tescol/00110 00110 + _dev/format tank tescol/00111 00111 + _dev/format tank tescol/01000 01000 + _dev/format tank tescol/01001 01001 + _dev/format tank tescol/01010 01010 + _dev/format tank tescol/01011 01011 + _dev/format tank tescol/01100 01100 + _dev/format tank tescol/01101 01101 + _dev/format tank tescol/01110 01110 + _dev/format tank tescol/01111 01111 + _dev/format tank tescol/10000 10000 + _dev/format tank tescol/10001 10001 + _dev/format tank tescol/10010 10010 + _dev/format tank tescol/10011 10011 + _dev/format tank tescol/10100 10100 + _dev/format tank tescol/10101 10101 + _dev/format tank tescol/10110 10110 + _dev/format tank tescol/10111 10111 + _dev/format tank tescol/11000 11000 + _dev/format tank tescol/11001 11001 + _dev/format tank tescol/11010 11010 + _dev/format tank tescol/11011 11011 + _dev/format tank tescol/11100 11100 + _dev/format tank tescol/11101 11101 + _dev/format tank tescol/11110 11110 + _dev/format tank tescol/11111 11111 + diff --git a/_dev/format b/_dev/format index 78432b5b..6daffd7f 100755 --- a/_dev/format +++ b/_dev/format @@ -1,11 +1,11 @@ #!/bin/sh -../shared/tools/bgf2bnf $1/$2.bgf $1/$2.bnf -../shared/tools/bgf2dms $1/$2.bgf $1/$2.dms -../shared/tools/bgf2sdf $1/$2.bgf $1/$2.sdf -../shared/tools/bgf2rsc $1/$2.bgf $1/$2.rsc -../topics/investigation/analysis/overview_bgf.py $1/$2.bgf >tmp.xml || exit -1 -xsltproc --stringparam date `date +"%d/%m/%Y"` --stringparam zoo ../../../www/_dev/$1.xml --stringparam id $3 --stringparam report ../../../www/tmp.xml ../topics/export/hypertext/bgf2fancy.xslt $1/$2.bgf >$1/$2.html || exit -1 -if [ -r ../topics/grammars/$3 ]; then - ls -1 ../topics/grammars/$3/*.xbgf | xargs -n1 -I _ basename _ .xbgf | xargs -n1 -I _ ../shared/tools/xbgf2html ../topics/grammars/$3/_.xbgf $1/$2-_.html `basename $2`.html +../slps/shared/tools/bgf2bnf $1/$2.bgf $1/$2.bnf +../slps/shared/tools/bgf2dms $1/$2.bgf $1/$2.dms +../slps/shared/tools/bgf2sdf $1/$2.bgf $1/$2.sdf +../slps/shared/tools/bgf2rsc $1/$2.bgf $1/$2.rsc +../slps/topics/investigation/analysis/overview_bgf.py $1/$2.bgf >tmp.xml || exit -1 +xsltproc --stringparam date `date +"%d/%m/%Y"` --stringparam zoo ../../../../grammarware.github.com/_dev/$1.xml --stringparam id $3 --stringparam report ../../../../grammarware.github.com/tmp.xml ../slps/topics/export/hypertext/bgf2fancy.xslt $1/$2.bgf >$1/$2.html || exit -1 +if [ -r ../slps/topics/grammars/$3 ]; then + ls -1 ../slps/topics/grammars/$3/*.xbgf | xargs -n1 -I _ basename _ .xbgf | xargs -n1 -I _ ../slps/shared/tools/xbgf2html ../slps/topics/grammars/$3/_.xbgf $1/$2-_.html `basename $2`.html fi diff --git a/_dev/list2makefile.xslt b/_dev/list2makefile.xslt index 8c1a23d2..99d86c55 100644 --- a/_dev/list2makefile.xslt +++ b/_dev/list2makefile.xslt @@ -19,7 +19,7 @@ - cp ../topics/grammars/ + cp ../slps/topics/grammars/ /grammar.bgf @@ -50,7 +50,7 @@ - cp ../topics/grammars/ + cp ../slps/topics/grammars/ /grammar.bgf diff --git a/_dev/list2xhtml.xslt b/_dev/list2xhtml.xslt index 972be450..a5e56549 100644 --- a/_dev/list2xhtml.xslt +++ b/_dev/list2xhtml.xslt @@ -123,7 +123,7 @@
  • BNF-like Grammar Format: - [Schema] + [Schema] [W3C XML Rec] [W3C XSD WD 1] [W3C XSD WD 2] @@ -205,7 +205,7 @@ - + @@ -216,7 +216,7 @@ - + diff --git a/_dev/tank.xml b/_dev/tank.xml index 49a162eb..bfd73f13 100644 --- a/_dev/tank.xml +++ b/_dev/tank.xml @@ -116,7 +116,7 @@ 17 May – 16 July 2008 topics/fl/java1/FL.g - SVN + GitHub http://www.antlr.org/ @@ -147,7 +147,7 @@ 28 July – 3 September 2008 topics/fl/prolog1/Parser.pro - SVN + GitHub @@ -184,8 +184,8 @@ 1–25 Aug 2008 - http://slps.svn.sourceforge.net/viewvc/slps/topics/fl/asfsdf/ - SVN + https://github.com/grammarware/slps/tree/master/topics/fl/asfsdf + GitHub @@ -202,7 +202,7 @@ 6–7 Jul 2009 topics/fl/txl/FL.Txl - SVN + GitHub @@ -219,7 +219,7 @@ 26 June 2008 – 28 May 2009 topics/fl/emf1/fl.ecore - SVN + GitHub @@ -233,7 +233,7 @@ Extracted - fl/ecore2 + fl/emf Vadim Zaytsev, <code xmlns="http://www.w3.org/1999/xhtml">fl.ecore</code> generated from <code xmlns="http://www.w3.org/1999/xhtml">fl.xsd</code> @@ -241,7 +241,7 @@ <date>28 May 2009</date> <link> <mu>topics/fl/emf2/model/fl.ecore</mu> - <name>SVN</name> + <name>GitHub</name> </link> <link> <uri>http://www.eclipse.org</uri> @@ -267,7 +267,7 @@ <date>20 May – 29 July 2008</date> <link> <mu>topics/fl/xsd/fl.xsd</mu> - <name>SVN</name> + <name>GitHub</name> </link> </source> <toolset ref="xsd2bgf"/> @@ -283,8 +283,8 @@ 17 May – 28 July 2008 - http://slps.svn.sourceforge.net/viewvc/slps/topics/fl/java1/types/ - SVN + https://github.com/grammarware/slps/tree/master/topics/fl/java1/types + GitHub @@ -306,8 +306,8 @@ 21 May – 28 July 2008 - http://slps.svn.sourceforge.net/viewvc/slps/topics/fl/java3/fl/ - SVN + topics/fl/java3/fl + GitHub http://jaxb.java.net/ @@ -650,7 +650,7 @@ - + TXL diff --git a/tank/fl/antlr.bgf b/tank/fl/antlr.bgf index a8d0f400..a00bcdcb 100644 --- a/tank/fl/antlr.bgf +++ b/tank/fl/antlr.bgf @@ -1,12 +1,17 @@ - + program + +f + function + + @@ -15,21 +20,36 @@ + +n + ID + + + +a + ID + + = + +e + expr + + @@ -45,14 +65,29 @@ + +b + binary + + + + +a apply + + + + +i ifThenElse + + @@ -61,18 +96,33 @@ + +l + atom + + + +o + ops + + + + +r atom + + @@ -85,13 +135,23 @@ + +i + ID + + + +a + atom + + @@ -105,20 +165,35 @@ if + +c + expr + + then + +e1 + expr + + else + +e2 + expr + + @@ -138,8 +213,13 @@ ( + +e + expr + + ) diff --git a/tank/fl/antlr.bnf b/tank/fl/antlr.bnf index f76c3694..1c94b095 100644 --- a/tank/fl/antlr.bnf +++ b/tank/fl/antlr.bnf @@ -1,21 +1,21 @@ program: - function+ + f::function+ function: - ID ID+ "=" expr NEWLINE+ + n::ID a::ID+ "=" e::expr NEWLINE+ expr: - binary - apply - ifThenElse + b::binary + a::apply + i::ifThenElse binary: - atom (ops atom)* + l::atom (o::ops r::atom)* apply: - ID atom+ + i::ID a::atom+ ifThenElse: - "if" expr "then" expr "else" expr + "if" c::expr "then" e1::expr "else" e2::expr atom: ID INT - "(" expr ")" + "(" e::expr ")" ops: "==" "+" diff --git a/tank/fl/antlr.dms b/tank/fl/antlr.dms index aa5bb959..a625cffd 100644 --- a/tank/fl/antlr.dms +++ b/tank/fl/antlr.dms @@ -1,14 +1,14 @@ -program = function+ ; -function = ID ID+ '=' expr NEWLINE+ ; -expr = binary ; -expr = apply ; -expr = ifThenElse ; -binary = atom (ops atom)* ; -apply = ID atom+ ; -ifThenElse = 'if' expr 'then' expr 'else' expr ; +program = f::function+ ; +function = n::ID a::ID+ '=' e::expr NEWLINE+ ; +expr = b::binary ; +expr = a::apply ; +expr = i::ifThenElse ; +binary = l::atom (o::ops r::atom)* ; +apply = i::ID a::atom+ ; +ifThenElse = 'if' c::expr 'then' e1::expr 'else' e2::expr ; atom = ID ; atom = INT ; -atom = '(' expr ')' ; +atom = '(' e::expr ')' ; ops = '==' ; ops = '+' ; ops = '-' ; diff --git a/tank/fl/antlr.html b/tank/fl/antlr.html index e467dbe2..ace61a54 100644 --- a/tank/fl/antlr.html +++ b/tank/fl/antlr.html @@ -15,29 +15,39 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Ralf Lämmel, FL.g (17 May – 16 July 2008)

    Summary

    • Number of production rules: 8
    • Number of top alternatives: 14
    • Number of defined nonterminal symbols: 8
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 1: program
    • Bottom nonterminal symbols: 3: ID, NEWLINE, INT
    • Number of used terminal symbols: 9
    • Special terminal symbols: 6: "=", "(", ")", "==", "+", "-"
    • Keywords: 3: "if", "then", "else"

    Syntax

    program:
    -        function+
    +		        

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Ralf Lämmel, FL.g (17 May – 16 July 2008)

    Summary

    • Number of production rules: 8
    • Number of top alternatives: 14
    • Number of defined nonterminal symbols: 8
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 1: program
    • Bottom nonterminal symbols: 3: ID, NEWLINE, INT
    • Number of used terminal symbols: 9
    • Special terminal symbols: 6: "=", "(", ")", "==", "+", "-"
    • Keywords: 3: "if", "then", "else"

    Syntax

    program:
    +        f::function+
     
    function:
    -        id id+ "=" expr NEWLINE+
    +        n::id a::id+ "=" e::expr NEWLINE+
     
    expr:
    -        binary
    -        apply
    -        ifThenElse
    +        b::binary
    +        a::apply
    +        i::ifThenElse
     
    binary:
    -        atom (ops atom)*
    +        l::atom (o::ops r::atom)*
     
    apply:
    -        id atom+
    +        i::id a::atom+
     
    ifThenElse:
    -        "if" expr "then" expr "else" expr
    +        "if" c::expr "then" e1::expr "else" e2::expr
     
    atom:
             id
             INT
    -        "(" expr ")"
    +        "(" e::expr ")"
     
    ops:
             "=="
             "+"
             "-"
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/antlr.rsc b/tank/fl/antlr.rsc index e10030c6..09dfe09f 100644 --- a/tank/fl/antlr.rsc +++ b/tank/fl/antlr.rsc @@ -3,33 +3,33 @@ module Antlr syntax Program = - Function+ + Function f+ ; syntax Function = - ID ID+ "=" Expr NEWLINE+ + ID n ID a+ "=" Expr e NEWLINE+ ; syntax Expr - = Binary - | Apply - | IfThenElse + = b: Binary + | a: Apply + | i: IfThenElse ; syntax Binary = - Atom (Ops Atom)* + Atom l (Ops o Atom r)* ; syntax Apply = - ID Atom+ + ID i Atom a+ ; syntax IfThenElse = - "if" Expr "then" Expr "else" Expr + "if" Expr c "then" Expr e1 "else" Expr e2 ; syntax Atom = ID | INT - | "(" Expr ")" + | "(" Expr e ")" ; syntax Ops = "==" diff --git a/tank/fl/antlr.sdf b/tank/fl/antlr.sdf index c7419f78..b9825b2f 100644 --- a/tank/fl/antlr.sdf +++ b/tank/fl/antlr.sdf @@ -4,23 +4,23 @@ exports sorts Program Function Expr Binary Apply IfThenElse Atom Ops context-free syntax - Function+ -> Program + f::Function+ -> Program - ID ID+ "=" Expr NEWLINE+ -> Function + n::ID a::ID+ "=" e::Expr NEWLINE+ -> Function - Binary - | Apply - | IfThenElse -> Expr + b::Binary + | a::Apply + | i::IfThenElse -> Expr - Atom (Ops Atom)* -> Binary + l::Atom (o::Ops r::Atom)* -> Binary - ID Atom+ -> Apply + i::ID a::Atom+ -> Apply - "if" Expr "then" Expr "else" Expr -> IfThenElse + "if" c::Expr "then" e1::Expr "else" e2::Expr -> IfThenElse ID | INT - | "(" Expr ")" -> Atom + | "(" e::Expr ")" -> Atom "==" | "+" diff --git a/tank/fl/dcg.html b/tank/fl/dcg.html index a2ec6b42..8a20fdc7 100644 --- a/tank/fl/dcg.html +++ b/tank/fl/dcg.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: +

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Ralf Lämmel, Parser.pro (28 July – 3 September 2008)

    Summary

    • Number of production rules: 11
    • Number of top alternatives: 11
    • Number of defined nonterminal symbols: 5
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 1: program
    • Bottom nonterminal symbols: 3: name, newline, int
    • Number of used terminal symbols: 9
    • Special terminal symbols: 6: "=", "(", ")", "==", "+", "-"
    • Keywords: 3: "if", "then", "else"

    Syntax

    program:
             function+
    @@ -41,5 +51,5 @@
             "-"
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/dcg.rsc b/tank/fl/dcg.rsc index c74842bf..107c287b 100644 --- a/tank/fl/dcg.rsc +++ b/tank/fl/dcg.rsc @@ -10,17 +10,17 @@ syntax Function Name Name+ "=" Expr Newline+ ; syntax Expr - = (Atom (Ops Atom)*) binary - | (Name Atom+) apply - | ("if" Expr "then" Expr "else" Expr) ifThenElse + = binary: Atom (Ops Atom)* + | apply: Name Atom+ + | ifThenElse: "if" Expr "then" Expr "else" Expr ; syntax Atom - = Int literal - | Name argument + = literal: Int + | argument: Name | "(" Expr ")" ; syntax Ops - = "==" equal - | "+" plus - | "-" minus + = equal: "==" + | plus: "+" + | minus: "-" ; diff --git a/tank/fl/ecore.html b/tank/fl/ecore.html index f483c7d9..019eba5b 100644 --- a/tank/fl/ecore.html +++ b/tank/fl/ecore.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Guido Wachsmuth, Vadim Zaytsev, fl.ecore (26 June 2008 – 28 May 2009)

    Summary

    • Number of production rules: 12
    • Number of top alternatives: 18
    • Number of defined nonterminal symbols: 12
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 1: Program
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Program:
    +		        

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Guido Wachsmuth, Vadim Zaytsev, fl.ecore (26 June 2008 – 28 May 2009)

    Summary

    • Number of production rules: 12
    • Number of top alternatives: 18
    • Number of defined nonterminal symbols: 12
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 1: Program
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Program:
             function::Function+
     
    Function:
             name::string argument::Argument+ definition::Exp
    @@ -47,5 +57,5 @@
             left::Exp right::Exp
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/ecore.rsc b/tank/fl/ecore.rsc index f6b428f9..74a089fc 100644 --- a/tank/fl/ecore.rsc +++ b/tank/fl/ecore.rsc @@ -11,7 +11,7 @@ syntax Function ; syntax Argument = - String name + name: String ; syntax Exp = LiteralExp @@ -22,11 +22,11 @@ syntax Exp ; syntax LiteralExp = - Integer value + value: Integer ; syntax ArgumentExp = - Argument argument + argument: Argument ; syntax IfThenElseExp = diff --git a/tank/fl/ecore2.bgf b/tank/fl/emf.bgf similarity index 100% rename from tank/fl/ecore2.bgf rename to tank/fl/emf.bgf diff --git a/tank/fl/ecore2.bnf b/tank/fl/emf.bnf similarity index 100% rename from tank/fl/ecore2.bnf rename to tank/fl/emf.bnf diff --git a/tank/fl/ecore2.dms b/tank/fl/emf.dms similarity index 100% rename from tank/fl/ecore2.dms rename to tank/fl/emf.dms diff --git a/tank/fl/ecore2.html b/tank/fl/emf.html similarity index 79% rename from tank/fl/ecore2.html rename to tank/fl/emf.html index b58531ee..517ed640 100644 --- a/tank/fl/ecore2.html +++ b/tank/fl/emf.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: +

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Vadim Zaytsev, fl.ecore generated from fl.xsd (28 May 2009)

    Summary

    • Number of production rules: 9
    • Number of top alternatives: 15
    • Number of defined nonterminal symbols: 9
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 1: ProgramType
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Apply:
             name::string arg::Expr+
    @@ -43,5 +53,5 @@
             function::Function+
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/ecore2.rsc b/tank/fl/emf.rsc similarity index 83% rename from tank/fl/ecore2.rsc rename to tank/fl/emf.rsc index 4b5faa6a..257bf752 100644 --- a/tank/fl/ecore2.rsc +++ b/tank/fl/emf.rsc @@ -1,5 +1,5 @@ @contributor{bgf2src automated exporter - SLPS} -module Ecore2 +module Emf syntax Apply = @@ -7,7 +7,7 @@ syntax Apply ; syntax Argument = - String name + name: String ; syntax Binary = @@ -30,12 +30,12 @@ syntax IfThenElse ; syntax Literal = - Integer info + info: Integer ; syntax Ops - = () Equal - | () Plus - | () Minus + = Equal: () + | Plus: () + | Minus: () ; syntax ProgramType = diff --git a/tank/fl/ecore2.sdf b/tank/fl/emf.sdf similarity index 100% rename from tank/fl/ecore2.sdf rename to tank/fl/emf.sdf diff --git a/tank/fl/jaxb.bgf b/tank/fl/jaxb.bgf index 62762897..d73ffcab 100644 --- a/tank/fl/jaxb.bgf +++ b/tank/fl/jaxb.bgf @@ -18,7 +18,7 @@ - +Expr @@ -109,7 +109,7 @@ - +string @@ -219,7 +219,7 @@ - +Function diff --git a/tank/fl/jaxb.bnf b/tank/fl/jaxb.bnf index dd6229a0..6516b100 100644 --- a/tank/fl/jaxb.bnf +++ b/tank/fl/jaxb.bnf @@ -1,5 +1,5 @@ Apply: - Name::STR Arg::(ANY*) + Name::STR Arg::(Expr*) Argument: Name::STR Binary: @@ -11,7 +11,7 @@ Expr: IfThenElse Literal Function: - Name::STR Arg::(ANY*) Rhs::Expr + Name::STR Arg::(STR*) Rhs::Expr IfThenElse: IfExpr::Expr ThenExpr::Expr ElseExpr::Expr Literal: @@ -25,4 +25,4 @@ Ops: package-info: EMPTY Program: - Function::(ANY*) + Function::(Function*) diff --git a/tank/fl/jaxb.dms b/tank/fl/jaxb.dms index 4d432bb2..00db398f 100644 --- a/tank/fl/jaxb.dms +++ b/tank/fl/jaxb.dms @@ -1,4 +1,4 @@ -Apply = Name::STR Arg::(ANY*) ; +Apply = Name::STR Arg::(Expr*) ; Argument = Name::STR ; Binary = Ops::Ops Left::Expr Right::Expr ; Expr = Apply ; @@ -6,7 +6,7 @@ Expr = Argument ; Expr = Binary ; Expr = IfThenElse ; Expr = Literal ; -Function = Name::STR Arg::(ANY*) Rhs::Expr ; +Function = Name::STR Arg::(STR*) Rhs::Expr ; IfThenElse = IfExpr::Expr ThenExpr::Expr ElseExpr::Expr ; Literal = Info::INT ; ObjectFactory = ; @@ -14,4 +14,4 @@ Ops = EQUAL:: ; Ops = PLUS:: ; Ops = MINUS:: ; package-info = ; -Program = Function::(ANY*) ; +Program = Function::(Function*) ; diff --git a/tank/fl/jaxb.html b/tank/fl/jaxb.html index 7ef4d71f..d32680d8 100644 --- a/tank/fl/jaxb.html +++ b/tank/fl/jaxb.html @@ -15,10 +15,20 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: +

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Ralf Lämmel, Program.java, Function.java et al. generated from fl.xsd. - (21 May – 28 July 2008)

    Summary

    • Number of production rules: 11
    • Number of top alternatives: 17
    • Number of defined nonterminal symbols: 11
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 4: Function, ObjectFactory, package-info, Program
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Apply:
    -        Name::string Arg::(any*)
    +				 (21 May – 28 July 2008) 

    Summary

    • Number of production rules: 11
    • Number of top alternatives: 17
    • Number of defined nonterminal symbols: 11
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 3: ObjectFactory, package-info, Program
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Apply:
    +        Name::string Arg::(Expr*)
     
    Argument:
             Name::string
     
    Binary:
    @@ -30,7 +40,7 @@
             IfThenElse
             Literal
     
    Function:
    -        Name::string Arg::(any*) Rhs::Expr
    +        Name::string Arg::(string*) Rhs::Expr
     
    IfThenElse:
             IfExpr::Expr ThenExpr::Expr ElseExpr::Expr
     
    Literal:
    @@ -44,8 +54,8 @@
     
    package-info:
             empty
     
    Program:
    -        Function::(any*)
    +        Function::(Function*)
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/jaxb.rsc b/tank/fl/jaxb.rsc index 1234d047..a35fd3d1 100644 --- a/tank/fl/jaxb.rsc +++ b/tank/fl/jaxb.rsc @@ -3,11 +3,11 @@ module Jaxb syntax Apply = - String Name ANY* Arg + String Name Expr* Arg ; syntax Argument = - String Name + Name: String ; syntax Binary = @@ -22,7 +22,7 @@ syntax Expr ; syntax Function = - String Name ANY* Arg Expr Rhs + String Name String* Arg Expr Rhs ; syntax IfThenElse = @@ -30,16 +30,16 @@ syntax IfThenElse ; syntax Literal = - Integer Info + Info: Integer ; syntax ObjectFactory = () ; syntax Ops - = () EQUAL - | () PLUS - | () MINUS + = EQUAL: () + | PLUS: () + | MINUS: () ; syntax Package_info = @@ -47,5 +47,5 @@ syntax Package_info ; syntax Program = - ANY* Function + Function: Function* ; diff --git a/tank/fl/jaxb.sdf b/tank/fl/jaxb.sdf index 2f76179a..add0a214 100644 --- a/tank/fl/jaxb.sdf +++ b/tank/fl/jaxb.sdf @@ -4,7 +4,7 @@ exports sorts Apply Argument Binary Expr Function IfThenElse Literal ObjectFactory Ops Package-info Program context-free syntax - Name::STR Arg::(ANY*) -> Apply + Name::STR Arg::(Expr*) -> Apply Name::STR -> Argument @@ -16,7 +16,7 @@ exports | IfThenElse | Literal -> Expr - Name::STR Arg::(ANY*) Rhs::Expr -> Function + Name::STR Arg::(STR*) Rhs::Expr -> Function IfExpr::Expr ThenExpr::Expr ElseExpr::Expr -> IfThenElse @@ -30,4 +30,4 @@ exports EMPTY -> Package-info - Function::(ANY*) -> Program + Function::(Function*) -> Program diff --git a/tank/fl/om.bgf b/tank/fl/om.bgf index 21655f5e..361bfdf6 100644 --- a/tank/fl/om.bgf +++ b/tank/fl/om.bgf @@ -1,4 +1,4 @@ - + Apply @@ -18,7 +18,7 @@ - +Expr @@ -109,7 +109,7 @@ - +string @@ -207,7 +207,7 @@ - +Function diff --git a/tank/fl/om.bnf b/tank/fl/om.bnf index 309d1178..43a0dcba 100644 --- a/tank/fl/om.bnf +++ b/tank/fl/om.bnf @@ -1,5 +1,5 @@ Apply: - name::STR args::(ANY*) + name::STR args::(Expr*) Argument: name::STR Binary: @@ -11,7 +11,7 @@ Expr: IfThenElse Literal Function: - name::STR args::(ANY*) rhs::Expr + name::STR args::(STR*) rhs::Expr IfThenElse: ifExpr::Expr thenExpr::Expr elseExpr::Expr Literal: @@ -21,6 +21,6 @@ Ops: Plus::EPSILON Minus::EPSILON Program: - functions::(ANY*) + functions::(Function*) Visitor: EMPTY diff --git a/tank/fl/om.dms b/tank/fl/om.dms index 60279b7c..58b8052c 100644 --- a/tank/fl/om.dms +++ b/tank/fl/om.dms @@ -1,4 +1,4 @@ -Apply = name::STR args::(ANY*) ; +Apply = name::STR args::(Expr*) ; Argument = name::STR ; Binary = ops::Ops left::Expr right::Expr ; Expr = Apply ; @@ -6,11 +6,11 @@ Expr = Argument ; Expr = Binary ; Expr = IfThenElse ; Expr = Literal ; -Function = name::STR args::(ANY*) rhs::Expr ; +Function = name::STR args::(STR*) rhs::Expr ; IfThenElse = ifExpr::Expr thenExpr::Expr elseExpr::Expr ; Literal = info::INT ; Ops = Equal:: ; Ops = Plus:: ; Ops = Minus:: ; -Program = functions::(ANY*) ; +Program = functions::(Function*) ; Visitor = ; diff --git a/tank/fl/om.html b/tank/fl/om.html index 80ae2494..5b254adf 100644 --- a/tank/fl/om.html +++ b/tank/fl/om.html @@ -15,10 +15,20 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: +

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Ralf Lämmel, Program.java, Function.java et al. - (17 May – 28 July 2008)

    Summary

    • Number of production rules: 10
    • Number of top alternatives: 16
    • Number of defined nonterminal symbols: 10
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 3: Function, Program, Visitor
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Apply:
    -        name::string args::(any*)
    +				 (17 May – 28 July 2008) 

    Summary

    • Number of production rules: 10
    • Number of top alternatives: 16
    • Number of defined nonterminal symbols: 10
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 2: Program, Visitor
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Apply:
    +        name::string args::(Expr*)
     
    Argument:
             name::string
     
    Binary:
    @@ -30,7 +40,7 @@
             IfThenElse
             Literal
     
    Function:
    -        name::string args::(any*) rhs::Expr
    +        name::string args::(string*) rhs::Expr
     
    IfThenElse:
             ifExpr::Expr thenExpr::Expr elseExpr::Expr
     
    Literal:
    @@ -40,10 +50,10 @@
             Plus::ε
             Minus::ε
     
    Program:
    -        functions::(any*)
    +        functions::(Function*)
     
    Visitor:
             empty
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/om.rsc b/tank/fl/om.rsc index 44dd691a..20022a2d 100644 --- a/tank/fl/om.rsc +++ b/tank/fl/om.rsc @@ -3,11 +3,11 @@ module Om syntax Apply = - String name ANY* args + String name Expr* args ; syntax Argument = - String name + name: String ; syntax Binary = @@ -22,7 +22,7 @@ syntax Expr ; syntax Function = - String name ANY* args Expr rhs + String name String* args Expr rhs ; syntax IfThenElse = @@ -30,16 +30,16 @@ syntax IfThenElse ; syntax Literal = - Integer info + info: Integer ; syntax Ops - = () Equal - | () Plus - | () Minus + = Equal: () + | Plus: () + | Minus: () ; syntax Program = - ANY* functions + functions: Function* ; syntax Visitor = diff --git a/tank/fl/om.sdf b/tank/fl/om.sdf index 965fa440..88719ad2 100644 --- a/tank/fl/om.sdf +++ b/tank/fl/om.sdf @@ -4,7 +4,7 @@ exports sorts Apply Argument Binary Expr Function IfThenElse Literal Ops Program Visitor context-free syntax - name::STR args::(ANY*) -> Apply + name::STR args::(Expr*) -> Apply name::STR -> Argument @@ -16,7 +16,7 @@ exports | IfThenElse | Literal -> Expr - name::STR args::(ANY*) rhs::Expr -> Function + name::STR args::(STR*) rhs::Expr -> Function ifExpr::Expr thenExpr::Expr elseExpr::Expr -> IfThenElse @@ -26,6 +26,6 @@ exports | Plus:: | Minus:: -> Ops - functions::(ANY*) -> Program + functions::(Function*) -> Program EMPTY -> Visitor diff --git a/tank/fl/sdf.html b/tank/fl/sdf.html index 4ee77e79..00569a0c 100644 --- a/tank/fl/sdf.html +++ b/tank/fl/sdf.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: +

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Ralf Lämmel, Vadim Zaytsev, FL.sdf, Syntax.sdf, et al. (1–25 Aug 2008)

    Summary

    • Number of production rules: 11
    • Number of top alternatives: 11
    • Number of defined nonterminal symbols: 4
    • Root nonterminal symbols: —
    • Other top nonterminal symbols: 1: Program
    • Bottom nonterminal symbols: 3: Name, Newline, Int
    • Number of used terminal symbols: 9
    • Special terminal symbols: 6: "=", "(", ")", "-", "+", "=="
    • Keywords: 3: "if", "then", "else"

    Syntax

    Program:
             Function+
    @@ -41,5 +51,5 @@
             "=="
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/sdf.rsc b/tank/fl/sdf.rsc index d355e972..2021557a 100644 --- a/tank/fl/sdf.rsc +++ b/tank/fl/sdf.rsc @@ -10,15 +10,15 @@ syntax Function Name Name+ "=" Expr Newline+ ; syntax Expr - = (Expr Ops Expr) binary - | (Name Expr+) apply - | ("if" Expr "then" Expr "else" Expr) ifThenElse + = binary: Expr Ops Expr + | apply: Name Expr+ + | ifThenElse: "if" Expr "then" Expr "else" Expr | "(" Expr ")" - | Name argument - | Int literal + | argument: Name + | literal: Int ; syntax Ops - = "-" minus - | "+" plus - | "==" equal + = minus: "-" + | plus: "+" + | equal: "==" ; diff --git a/tank/fl/txl.bgf b/tank/fl/txl.bgf index 02fefd28..6c9b41fa 100644 --- a/tank/fl/txl.bgf +++ b/tank/fl/txl.bgf @@ -1,2 +1,132 @@ -programprogramfunfunidid=expressionnewlineexpressionexpressionopexpressionidexpressionifexpressionthenexpressionelseexpression(expression)idnumberop+-== + + + program + + program + + + + fun + + + + + + fun + + + + id + + + + + id + + + + + = + + + expression + + + newline + + + + + + expression + + + + + + expression + + + op + + + expression + + + + + + + id + + + + + expression + + + + + + + + + if + + + expression + + + then + + + expression + + + else + + + expression + + + + + + + ( + + + expression + + + ) + + + + + id + + + number + + + + + + op + + + + + + + + - + + + == + + + + + \ No newline at end of file diff --git a/tank/fl/txl.html b/tank/fl/txl.html index 1462287a..4692b1e7 100644 --- a/tank/fl/txl.html +++ b/tank/fl/txl.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: +

    Browsable FL Concrete Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Vadim Zaytsev, FL.Txl. (6–7 Jul 2009)

    Summary

    • Number of production rules: 4
    • Number of top alternatives: 11
    • Number of defined nonterminal symbols: 4
    • Root nonterminal symbols: program
    • Other top nonterminal symbols: —
    • Bottom nonterminal symbols: 3: id, newline, number
    • Number of used terminal symbols: 9
    • Special terminal symbols: 6: "=", "(", ")", "+", "-", "=="
    • Keywords: 3: "if", "then", "else"

    Syntax

    program:
             fun+
    @@ -34,5 +44,5 @@
             "=="
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/xml.bgf b/tank/fl/xml.bgf deleted file mode 100644 index c36a5628..00000000 --- a/tank/fl/xml.bgf +++ /dev/null @@ -1,226 +0,0 @@ - - - - Program - Fragment - - Program - - - - - function - - Function - - - - - - - - Fragment - - Expr - - - - Function - - - - - name - - string - - - - - - - - arg - - string - - - - - - - - rhs - - Expr - - - - - - - - Expr - - - - Literal - - - Argument - - - Binary - - - IfThenElse - - - Apply - - - - - - Literal - - - info - - int - - - - - - Argument - - - name - - string - - - - - - Binary - - - - - ops - - Ops - - - - - - left - - Expr - - - - - - right - - Expr - - - - - - - - Ops - - - - - Equal - - - - - - - - Plus - - - - - - - - Minus - - - - - - - - - - IfThenElse - - - - - ifExpr - - Expr - - - - - - thenExpr - - Expr - - - - - - elseExpr - - Expr - - - - - - - - Apply - - - - - name - - string - - - - - - - - arg - - Expr - - - - - - - - - \ No newline at end of file diff --git a/tank/fl/xsd.html b/tank/fl/xsd.html index 77e04c6a..0935507a 100644 --- a/tank/fl/xsd.html +++ b/tank/fl/xsd.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: +

    Browsable FL Abstract Syntax Grammar

    CC-BY

    Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

    Source used for this grammar: Ralf Lämmel, fl.xsd. (20 May – 29 July 2008)

    Summary

    • Number of production rules: 10
    • Number of top alternatives: 16
    • Number of defined nonterminal symbols: 10
    • Root nonterminal symbols: Program, Fragment
    • Other top nonterminal symbols: —
    • Bottom nonterminal symbols: —
    • Number of used terminal symbols:

    Syntax

    Program:
             function::Function+
    @@ -45,5 +55,5 @@
             name::string arg::Expr+
     

    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
    diff --git a/tank/fl/xsd.rsc b/tank/fl/xsd.rsc index d997a2a3..2debf04d 100644 --- a/tank/fl/xsd.rsc +++ b/tank/fl/xsd.rsc @@ -22,20 +22,20 @@ syntax Expr ; syntax Literal = - Integer info + info: Integer ; syntax Argument = - String name + name: String ; syntax Binary = Ops ops Expr left Expr right ; syntax Ops - = () Equal - | () Plus - | () Minus + = Equal: () + | Plus: () + | Minus: () ; syntax IfThenElse = diff --git a/tank/index.html b/tank/index.html index 9b1d62e6..da288d2e 100644 --- a/tank/index.html +++ b/tank/index.html @@ -1,8 +1,9 @@ -Software Language Processing Suite — Grammar tank

    Software Language Processing Suite

    Grammar Zoo | Grammar Tank

    The objective of the Grammar Tank is to compose a grammar base of multiple different grammars for the same intended language to be used in language engineering research. -

    54 grammars and counting

    FL(E)BNFTESCOL


    Factorial Language

    FL Concrete SyntaxFL Abstract Syntax

    FL Concrete Syntax (4 grammars)

    • Source: Ralf Lämmel, FL.g (17 May – 16 July 2008) [SVN] [ANTLR]
    • Extracted grammar: +

      53 grammars and counting

      FL(E)BNFTESCOL


      Factorial Language

      FL Concrete SyntaxFL Abstract Syntax

      FL Concrete Syntax (4 grammars)

      • Source: Ralf Lämmel, Parser.pro - (28 July – 3 September 2008) [SVN]
      • Extracted grammar: + (28 July – 3 September 2008) [GitHub]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -31,9 +32,9 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [dcg2bgf.pro]
      • R. Lämmel, G. Riedewald. Prological Language Processing. LDTA 2001. [LDTA] [Paper] [Slides]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]
      • Source: +
      • Extraction tools: [dcg2bgf.pro]
      • R. Lämmel, G. Riedewald. Prological Language Processing. LDTA 2001. [LDTA] [Paper] [Slides]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]

      FL Abstract Syntax (5 grammars)

      • Source: Guido Wachsmuth, Vadim Zaytsev, fl.ecore (26 June 2008 – 28 May 2009) [SVN]
      • Extracted grammar: +
      • Extraction tools: [txl.grm] [txl2bgf.xslt]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]

      FL Abstract Syntax (5 grammars)

      • Source: Guido Wachsmuth, Vadim Zaytsev, fl.ecore (26 June 2008 – 28 May 2009) [GitHub]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -59,19 +60,19 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [ecore2bgf.xslt]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]
      • Source: +
      • Extraction tools: [ecore2bgf.xslt]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]
      • Source: Ralf Lämmel, fl.xsd. - (20 May – 29 July 2008) [SVN]
      • Extracted grammar: + (20 May – 29 July 2008) [GitHub]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -79,9 +80,9 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [xsd2bgf.pro]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]
      • Source: +
      • Extraction tools: [xsd2bgf.pro]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]
      • Source: Ralf Lämmel, Program.java, Function.java et al. - (17 May – 28 July 2008) [SVN]
      • Extracted grammar: + (17 May – 28 July 2008) [GitHub]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -89,9 +90,9 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [slps.java2bgf.Tool]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]
      • Source: +
      • Extraction tools: [slps.java2bgf.Tool]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]
      • Source: Ralf Lämmel, Program.java, Function.java et al. generated from fl.xsd. - (21 May – 28 July 2008) [SVN] [JAXB]
      • Extracted grammar: + (21 May – 28 July 2008) [GitHub] [JAXB]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -99,9 +100,9 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [slps.java2bgf.Tool]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]

      Metasyntax

      BGF in XSDBNF in SDFEBNF of BGFEBNF of ISOEBNF in SDFLLLRascalTXLYACC

      BGF in XSD

      • Source: +
      • Extraction tools: [slps.java2bgf.Tool]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]

      Metasyntax

      BGF in XSDBNF in SDFEBNF of BGFEBNF of ISOEBNF in SDFLLLTXLYACC

      BGF in XSD

      • Source: Ralf Lämmel, Vadim Zaytsev, bgf.xsd - (28 July 2008 – 5 February 2009) [SVN]
      • Extracted grammar: + (28 July 2008 – 5 February 2009) [SVN]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -109,7 +110,7 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [xsd2bgf.pro]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]

      BNF in SDF

      • Source: +
      • Extraction tools: [xsd2bgf.pro]
      • R. Lämmel, V. Zaytsev. An Introduction to Grammar Convergence. iFM 2009. [iFM] [LNCS] [ACM] [Paper] [Slides]
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]

      BNF in SDF

      EBNF of BGF

      EBNF of BGF

      • Source: Vadim Zaytsev, ebnf-bgf.bgf - (11 July 2010 – 11 February 2011) [SVN]
      • Handcrafted grammar: + (11 July 2010 – 11 February 2011) [SVN]
      • Handcrafted grammar: [Browsable] [BGF] [EBNF] @@ -132,7 +133,7 @@
      • V. Zaytsev. Recovery, Convergence and Documentation of Languages. Vrije Universiteit Amsterdam, 2010. [Thesis] [Slides]

      EBNF of ISO (3 grammars)

      • Source: ISO/IEC 14977:1996(E). Information Technology—Syntactic Metalanguage—Extended BNF - (1996), §8.1 “The syntax of Extended BNF”, pages 8–10 [PDF] [ReadMe]
      • Recovered grammar: + (1996), §8.1 “The syntax of Extended BNF”, pages 8–10 [PDF] [ReadMe]
      • Recovered grammar: [Browsable] [BGF] [EBNF] @@ -140,10 +141,10 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [EDD] [Hunter] [post-extract.xbgf]
      • Recovery tools: [refactor.xbgf]
      • Source: ISO/IEC 14977:1996(E). Information Technology—Syntactic Metalanguage—Extended BNF - (1996), §8.2 “Extended BNF used to define itself informally”, page 10 [PDF] [ReadMe]
      • Recovered grammar: + (1996), §8.2 “Extended BNF used to define itself informally”, page 10 [PDF] [ReadMe]
      • Recovered grammar: [Browsable] [BGF] [EBNF] @@ -151,10 +152,10 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [EDD] [Hunter] [post-extract.xbgf]
      • Recovery tools: [refactor.xbgf]
      • Source: ISO/IEC 14977:1996(E). Information Technology—Syntactic Metalanguage—Extended BNF - (1996), §8.3 “Extended BNF defined informally”, page 10 [PDF] [ReadMe]
      • Recovered grammar: + (1996), §8.3 “Extended BNF defined informally”, page 10 [PDF] [ReadMe]
      • Recovered grammar: [Browsable] [BGF] [EBNF] @@ -162,7 +163,7 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [EDD] [Hunter] [post-extract.xbgf]
      • Recovery tools: [refactor.xbgf]

      EBNF in SDF

      EBNF in SDF

      LLL (2 grammars)

      LLL (2 grammars)

      • Source: Jan Kort, Ralf Lämmel, Chris Verhoef, The LLL grammar format (April 2002), GDK System Demo, page 2 [GDK] [ReadMe]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -180,7 +181,7 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [LLL.EDD] [Hunter] [reroot2top]
      • J. Kort, R. Lämmel, C. Verhoef. The Grammar Deployment Kit — System Demonstration. LDTA'02, ENTCS 65:3, 2002. [Abstract] [PDF]
      • Source: Jan Kort, The LLL grammar format (May 2003), GDK Reference Manual, Chapter 3, page 3 [GDK] [ReadMe]
      • Extracted grammar: +
      • Extraction tools: [LLL.EDD] [Hunter] [reroot2top]
      • J. Kort, R. Lämmel, C. Verhoef. The Grammar Deployment Kit — System Demonstration. LDTA'02, ENTCS 65:3, 2002. [Abstract] [PDF]
      • Source: Jan Kort, The LLL grammar format (May 2003), GDK Reference Manual, Chapter 3, page 3 [GDK] [ReadMe]
      • Extracted grammar: [Browsable] [BGF] [EBNF] @@ -188,17 +189,7 @@ [DMS BNF] [SDF] [Rascal] -
      • Extraction tools: [LLL.EDD] [Hunter] [reroot2top]
      • J. Kort, R. Lämmel, C. Verhoef. The Grammar Deployment Kit — System Demonstration. LDTA'02, ENTCS 65:3, 2002. [Abstract] [PDF]
      • J. Kort. Grammar Deployment Kit Reference Manual. UvA 2003. [PDF]

      Rascal

      TXL

      • Source: James R. Cordy, Validated TXL Basis Grammar for TXL 10.5 (February 2009), Version 1.0 [TXL]
      • Extracted grammar: +
      • Extraction tools: [LLL.EDD] [Hunter] [reroot2top]
      • J. Kort, R. Lämmel, C. Verhoef. The Grammar Deployment Kit — System Demonstration. LDTA'02, ENTCS 65:3, 2002. [Abstract] [PDF]
      • J. Kort. Grammar Deployment Kit Reference Manual. UvA 2003. [PDF]

      TXL

      YACC

      YACC


      TESt COmpiler Language

      TESCOL

      TESCOL (33 grammars)


      TESt COmpiler Language

      TESCOL

      TESCOL (33 grammars)

      • Source: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010) [328d]
      • Reference grammar: [Browsable] @@ -452,7 +443,7 @@

      Appendix: Notations and Formats


      All grammars are distributed on terms of the CC-BY license as well as on terms of any other license bound to the source of our research in a way that enforces - its propagation to derivatives.

      The page is maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated: 16/09/2011[↑SLPS]

      CC-BYXHTML 1.0CSS 2.1
      + its propagation to derivatives.

      The page is maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated: 03/10/2012[↑SLPS]

      CC-BYXHTML 1.0CSS 2.1 diff --git a/tank/metasyntax/bgf.bgf b/tank/metasyntax/bgf.bgf index 06971917..65004c4e 100644 --- a/tank/metasyntax/bgf.bgf +++ b/tank/metasyntax/bgf.bgf @@ -188,6 +188,36 @@ + + + seplistplus + + + + expression + + + expression + + + + + + + + sepliststar + + + + expression + + + expression + + + + + diff --git a/tank/metasyntax/bgf.bnf b/tank/metasyntax/bgf.bnf index ff51b779..5711f70a 100644 --- a/tank/metasyntax/bgf.bnf +++ b/tank/metasyntax/bgf.bnf @@ -16,6 +16,8 @@ expression: optional::expression plus::expression star::expression + seplistplus::(expression expression) + sepliststar::(expression expression) value: int::EPSILON string::EPSILON diff --git a/tank/metasyntax/bgf.dms b/tank/metasyntax/bgf.dms index 33e5071c..6e1897b8 100644 --- a/tank/metasyntax/bgf.dms +++ b/tank/metasyntax/bgf.dms @@ -13,6 +13,8 @@ expression = choice::(expression+) ; expression = optional::expression ; expression = plus::expression ; expression = star::expression ; +expression = seplistplus::(expression expression) ; +expression = sepliststar::(expression expression) ; value = int:: ; value = string:: ; label = STR ; diff --git a/tank/metasyntax/bgf.html b/tank/metasyntax/bgf.html index fc1d3446..6e04fd7a 100644 --- a/tank/metasyntax/bgf.html +++ b/tank/metasyntax/bgf.html @@ -15,9 +15,19 @@ border-collapse: collapse; background-color: #ECECEC; } -

      Browsable BGF in XSD Grammar

      CC-BY

      Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

      Source used for this grammar: +

      Browsable BGF in XSD Grammar

      CC-BY

      Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

      Source used for this grammar: Ralf Lämmel, Vadim Zaytsev, bgf.xsd - (28 July 2008 – 5 February 2009)

      Summary

      • Number of production rules: 8
      • Number of top alternatives: 21
      • Number of defined nonterminal symbols: 8
      • Root nonterminal symbols: grammar, production, expression
      • Other top nonterminal symbols: —
      • Bottom nonterminal symbols: —
      • Number of used terminal symbols:

      Syntax

      grammar:
      +				 (28 July 2008 – 5 February 2009) 

      Summary

      • Number of production rules: 8
      • Number of top alternatives: 23
      • Number of defined nonterminal symbols: 8
      • Root nonterminal symbols: grammar, production, expression
      • Other top nonterminal symbols: —
      • Bottom nonterminal symbols: —
      • Number of used terminal symbols:

      Syntax

      grammar:
               root::nonterminal* production*
       
      production:
               label::label? nonterminal::nonterminal expression
      @@ -35,6 +45,8 @@
               optional::expression
               plus::expression
               star::expression
      +        seplistplus::(expression expression)
      +        sepliststar::(expression expression)
       
      value:
               int::ε
               string::ε
      @@ -48,5 +60,5 @@
               string
       

      Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
      diff --git a/tank/metasyntax/bgf.rsc b/tank/metasyntax/bgf.rsc index 719a3050..a8961454 100644 --- a/tank/metasyntax/bgf.rsc +++ b/tank/metasyntax/bgf.rsc @@ -10,23 +10,25 @@ syntax Production Label label? Nonterminal nonterminal Expression ; syntax Expression - = () epsilon - | () empty - | Value value - | () any - | Terminal terminal - | Nonterminal nonterminal - | (Selector selector Expression) selectable - | Expression+ sequence - | Expression marked - | Expression+ choice - | Expression optional - | Expression plus - | Expression star + = epsilon: () + | empty: () + | value: Value + | any: () + | terminal: Terminal + | nonterminal: Nonterminal + | selectable: Selector selector Expression + | sequence: Expression+ + | marked: Expression + | choice: Expression+ + | optional: Expression + | plus: Expression + | star: Expression + | seplistplus: Expression Expression + | sepliststar: Expression Expression ; syntax Value - = () int - | () string + = int: () + | string: () ; syntax Label = diff --git a/tank/metasyntax/bgf.sdf b/tank/metasyntax/bgf.sdf index 49b59665..95d40188 100644 --- a/tank/metasyntax/bgf.sdf +++ b/tank/metasyntax/bgf.sdf @@ -21,7 +21,9 @@ exports | choice::(Expression+) | optional::Expression | plus::Expression - | star::Expression -> Expression + | star::Expression + | seplistplus::(Expression Expression) + | sepliststar::(Expression Expression) -> Expression int:: | string:: -> Value diff --git a/tank/metasyntax/bnf-sdf-correct.html b/tank/metasyntax/bnf-sdf-correct.html index 2dca5f71..c6ba25cd 100644 --- a/tank/metasyntax/bnf-sdf-correct.html +++ b/tank/metasyntax/bnf-sdf-correct.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

      correct

      Source: SLPS/topics/grammars/metasyntax/bnf-sdf/correct.xbgf

      • reroot (Rules); +

        correct

        Source: SLPS/topics/grammars/metasyntax/bnf-sdf/correct.xbgf


        Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
        diff --git a/tank/metasyntax/bnf-sdf.html b/tank/metasyntax/bnf-sdf.html index b8d5ca27..ad8fc0ae 100644 --- a/tank/metasyntax/bnf-sdf.html +++ b/tank/metasyntax/bnf-sdf.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

        Browsable BNF in SDF Grammar

        CC-BY

        Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

        Source used for this grammar: +

        Browsable BNF in SDF Grammar

        CC-BY

        Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

        Source used for this grammar: Tijs van der Storm, BNF.sdf (28 March 2003)

        Summary

        • Number of production rules: 6
        • Number of top alternatives: 19
        • Number of defined nonterminal symbols: 6
        • Root nonterminal symbols: Rules
        • Other top nonterminal symbols: —
        • Bottom nonterminal symbols: —
        • Number of used terminal symbols: 9
        • Special terminal symbols: 9: "::=", "<", ">", "|", "[", "]", "{", "}", "..."

        Syntax

        Rules:
                 Rule*
        @@ -44,5 +54,5 @@
                 string
         

        Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
        diff --git a/tank/metasyntax/ebnf-bgf.html b/tank/metasyntax/ebnf-bgf.html index 1a8130a4..d65840b2 100644 --- a/tank/metasyntax/ebnf-bgf.html +++ b/tank/metasyntax/ebnf-bgf.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

        Browsable EBNF of BGF Grammar

        CC-BY

        Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

        Source used for this grammar: +

        Browsable EBNF of BGF Grammar

        CC-BY

        Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

        Source used for this grammar: Vadim Zaytsev, ebnf-bgf.bgf (11 July 2010 – 11 February 2011)

        Summary

        • Number of production rules: 28
        • Number of top alternatives: 40
        • Number of defined nonterminal symbols: 28
        • Root nonterminal symbols: grammar
        • Other top nonterminal symbols: —
        • Bottom nonterminal symbols: —
        • Number of used terminal symbols: 20
        • Special terminal symbols: 15: "[", "]", ":", "\n", " ", " ", "::", "<", ">", "+", "*", "?", """, "(", ")"
        • Keywords: 5: "EMPTY", "EPSILON", "ANY", "INT", "STR"

        Syntax

        grammar:
                 production+
        @@ -87,5 +97,5 @@
                 ")"
         

        Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
        diff --git a/tank/metasyntax/ebnf-iso-1-generalize.html b/tank/metasyntax/ebnf-iso-1-generalize.html index 8bc31157..b6488b4a 100644 --- a/tank/metasyntax/ebnf-iso-1-generalize.html +++ b/tank/metasyntax/ebnf-iso-1-generalize.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

        generalize

        Source: SLPS/topics/grammars/metasyntax/ebnf-iso-1/generalize.xbgf

        • replace ( +

          generalize

          Source: SLPS/topics/grammars/metasyntax/ebnf-iso-1/generalize.xbgf


          Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
          diff --git a/tank/metasyntax/ebnf-iso-1-post-extract.html b/tank/metasyntax/ebnf-iso-1-post-extract.html index 9e97f51d..3c339b05 100644 --- a/tank/metasyntax/ebnf-iso-1-post-extract.html +++ b/tank/metasyntax/ebnf-iso-1-post-extract.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

          post-extract

          Source: SLPS/topics/grammars/metasyntax/ebnf-iso-1/post-extract.xbgf

          • replace ( +

            post-extract

            Source: SLPS/topics/grammars/metasyntax/ebnf-iso-1/post-extract.xbgf


            Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
            diff --git a/tank/metasyntax/ebnf-iso-1-refactor.html b/tank/metasyntax/ebnf-iso-1-refactor.html index 71a675eb..4b3e2dc0 100644 --- a/tank/metasyntax/ebnf-iso-1-refactor.html +++ b/tank/metasyntax/ebnf-iso-1-refactor.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

            refactor

            Source: SLPS/topics/grammars/metasyntax/ebnf-iso-1/refactor.xbgf

            • extract ( +

              refactor

              Source: SLPS/topics/grammars/metasyntax/ebnf-iso-1/refactor.xbgf


              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
              diff --git a/tank/metasyntax/ebnf-iso-1.html b/tank/metasyntax/ebnf-iso-1.html index 65ac6729..58053637 100644 --- a/tank/metasyntax/ebnf-iso-1.html +++ b/tank/metasyntax/ebnf-iso-1.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

              Browsable EBNF of ISO Grammar

              CC-BY

              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

              Source used for this grammar: +

              Browsable EBNF of ISO Grammar

              CC-BY

              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

              Source used for this grammar: ISO/IEC 14977:1996(E). Information Technology—Syntactic Metalanguage—Extended BNF (1996) §8.1 “The syntax of Extended BNF”, pages 8–10

              Summary

              • Number of production rules: 53
              • Number of top alternatives: 172
              • Number of defined nonterminal symbols: 51
              • Root nonterminal symbols: —
              • Other top nonterminal symbols: 1: syntax
              • Bottom nonterminal symbols: 1: syntactic-factor
              • Number of used terminal symbols: 106
              • Special terminal symbols: 106: "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", "=", "|", "/", "!", "*)", ")", "]", "/)", "}", ":)", "-", "’", "*", """, "?", "(*", "(", "[", "(/", "{", "(:", ";", ".", " ", ":", "+", "_", "%", "@", "&", "#", "$", "<", ">", "\", "^", "‘", "~", "\t", "\r", "\n", "\v", "\f"

              Syntax

              letter:
              @@ -245,5 +255,5 @@
                       ε
               

              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
              diff --git a/tank/metasyntax/ebnf-iso-2-post-extract.html b/tank/metasyntax/ebnf-iso-2-post-extract.html index c06d9351..6eb3ea3c 100644 --- a/tank/metasyntax/ebnf-iso-2-post-extract.html +++ b/tank/metasyntax/ebnf-iso-2-post-extract.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

              post-extract

              Source: SLPS/topics/grammars/metasyntax/ebnf-iso-2/post-extract.xbgf

              • replace ( +

                post-extract

                Source: SLPS/topics/grammars/metasyntax/ebnf-iso-2/post-extract.xbgf


                Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                diff --git a/tank/metasyntax/ebnf-iso-2-refactor.html b/tank/metasyntax/ebnf-iso-2-refactor.html index afb04d4d..2c831e6a 100644 --- a/tank/metasyntax/ebnf-iso-2-refactor.html +++ b/tank/metasyntax/ebnf-iso-2-refactor.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

                refactor

                Source: SLPS/topics/grammars/metasyntax/ebnf-iso-2/refactor.xbgf

                • massage ( +

                  refactor

                  Source: SLPS/topics/grammars/metasyntax/ebnf-iso-2/refactor.xbgf


                  Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                  diff --git a/tank/metasyntax/ebnf-iso-2.html b/tank/metasyntax/ebnf-iso-2.html index eee3a70e..f76ceb94 100644 --- a/tank/metasyntax/ebnf-iso-2.html +++ b/tank/metasyntax/ebnf-iso-2.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                  Browsable EBNF of ISO Grammar

                  CC-BY

                  Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                  Source used for this grammar: +

                  Browsable EBNF of ISO Grammar

                  CC-BY

                  Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                  Source used for this grammar: ISO/IEC 14977:1996(E). Information Technology—Syntactic Metalanguage—Extended BNF (1996) §8.2 “Extended BNF used to define itself informally”, page 10

                  Summary

                  • Number of production rules: 18
                  • Number of top alternatives: 28
                  • Number of defined nonterminal symbols: 18
                  • Root nonterminal symbols: —
                  • Other top nonterminal symbols: 1: syntax
                  • Bottom nonterminal symbols: 3: character, letter, decimal_digit
                  • Number of used terminal symbols: 17
                  • Special terminal symbols: 17: "=", ";", "|", ",", "-", "*", "[", "]", "{", "}", "(", ")", "’", """, "?", "(*", "*)"

                  Syntax

                  syntax:
                  @@ -66,5 +76,5 @@
                           character
                   

                  Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                  diff --git a/tank/metasyntax/ebnf-iso-3-post-extract.html b/tank/metasyntax/ebnf-iso-3-post-extract.html index bfbb3cb3..6f2e84e1 100644 --- a/tank/metasyntax/ebnf-iso-3-post-extract.html +++ b/tank/metasyntax/ebnf-iso-3-post-extract.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

                  post-extract

                  Source: SLPS/topics/grammars/metasyntax/ebnf-iso-3/post-extract.xbgf

                  • replace ( +

                    post-extract

                    Source: SLPS/topics/grammars/metasyntax/ebnf-iso-3/post-extract.xbgf


                    Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                    diff --git a/tank/metasyntax/ebnf-iso-3-refactor.html b/tank/metasyntax/ebnf-iso-3-refactor.html index 602a0331..82e63c0c 100644 --- a/tank/metasyntax/ebnf-iso-3-refactor.html +++ b/tank/metasyntax/ebnf-iso-3-refactor.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

                    refactor

                    Source: SLPS/topics/grammars/metasyntax/ebnf-iso-3/refactor.xbgf

                    • massage ( +

                      refactor

                      Source: SLPS/topics/grammars/metasyntax/ebnf-iso-3/refactor.xbgf


                      Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                      diff --git a/tank/metasyntax/ebnf-iso-3.html b/tank/metasyntax/ebnf-iso-3.html index 707b4b7d..2fc3ca5d 100644 --- a/tank/metasyntax/ebnf-iso-3.html +++ b/tank/metasyntax/ebnf-iso-3.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                      Browsable EBNF of ISO Grammar

                      CC-BY

                      Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                      Source used for this grammar: +

                      Browsable EBNF of ISO Grammar

                      CC-BY

                      Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                      Source used for this grammar: ISO/IEC 14977:1996(E). Information Technology—Syntactic Metalanguage—Extended BNF (1996) §8.3 “Extended BNF defined informally”, page 10

                      Summary

                      • Number of production rules: 18
                      • Number of top alternatives: 28
                      • Number of defined nonterminal symbols: 18
                      • Root nonterminal symbols: —
                      • Other top nonterminal symbols: 1: SYNTAX
                      • Bottom nonterminal symbols: 3: CHARACTER, LETTER, DIGIT
                      • Number of used terminal symbols: 17
                      • Special terminal symbols: 17: "=", ".", "/", ",", "-", "*", "(/", "/)", "(:", ":)", "(", ")", "’", """, "?", "(*", "*)"

                      Syntax

                      SYNTAX:
                      @@ -66,5 +76,5 @@
                               CHARACTER
                       

                      Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                      diff --git a/tank/metasyntax/ebnf-sdf-correct.html b/tank/metasyntax/ebnf-sdf-correct.html index 35821e57..15b5cef3 100644 --- a/tank/metasyntax/ebnf-sdf-correct.html +++ b/tank/metasyntax/ebnf-sdf-correct.html @@ -7,7 +7,17 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

                      correct

                      Source: SLPS/topics/grammars/metasyntax/ebnf-sdf/correct.xbgf

                      • reroot (Grammar); +

                        correct

                        Source: SLPS/topics/grammars/metasyntax/ebnf-sdf/correct.xbgf


                        Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                        diff --git a/tank/metasyntax/ebnf-sdf.html b/tank/metasyntax/ebnf-sdf.html index 67bd8432..9f3d25e4 100644 --- a/tank/metasyntax/ebnf-sdf.html +++ b/tank/metasyntax/ebnf-sdf.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                        Browsable EBNF in SDF Grammar

                        CC-BY

                        Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                        Source used for this grammar: +

                        Browsable EBNF in SDF Grammar

                        CC-BY

                        Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                        Source used for this grammar: Paul Klint, W3C version of EBNF.sdf (27 March 2007)

                        Summary

                        • Number of production rules: 5
                        • Number of top alternatives: 12
                        • Number of defined nonterminal symbols: 5
                        • Root nonterminal symbols: Grammar
                        • Other top nonterminal symbols: —
                        • Bottom nonterminal symbols: —
                        • Number of used terminal symbols: 8
                        • Special terminal symbols: 8: "::=", "(", ")", "?", "*", "+", "|", """

                        Syntax

                        Grammar:
                                 Rule*
                        @@ -36,5 +46,5 @@
                                 """ string """
                         

                        Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                        diff --git a/tank/metasyntax/lll-kort-reroot.prepared.html b/tank/metasyntax/lll-kort-reroot.prepared.html index 5dfdab6e..34223f37 100644 --- a/tank/metasyntax/lll-kort-reroot.prepared.html +++ b/tank/metasyntax/lll-kort-reroot.prepared.html @@ -7,8 +7,18 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

                        reroot.prepared

                        Source: SLPS/topics/grammars/metasyntax/lll-kort/reroot.prepared.xbgf

                        • reroot (specification); +

                          reroot.prepared

                          Source: SLPS/topics/grammars/metasyntax/lll-kort/reroot.prepared.xbgf


                          Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                          diff --git a/tank/metasyntax/lll-kort.bgf b/tank/metasyntax/lll-kort.bgf index 0db500ea..88a77adc 100644 --- a/tank/metasyntax/lll-kort.bgf +++ b/tank/metasyntax/lll-kort.bgf @@ -34,25 +34,14 @@ disjunction - + conjunction - - - - - | - - - conjunction - - - - + | - + diff --git a/tank/metasyntax/lll-kort.bnf b/tank/metasyntax/lll-kort.bnf index 75c59037..2f6fe5bb 100644 --- a/tank/metasyntax/lll-kort.bnf +++ b/tank/metasyntax/lll-kort.bnf @@ -3,7 +3,7 @@ specification: rule: ident ":" disjunction ";" disjunction: - conjunction ("|" conjunction)* + {conjunction "|"}+ conjunction: term+ term: diff --git a/tank/metasyntax/lll-kort.dms b/tank/metasyntax/lll-kort.dms index f64eb2d9..f88c7831 100644 --- a/tank/metasyntax/lll-kort.dms +++ b/tank/metasyntax/lll-kort.dms @@ -1,6 +1,9 @@ specification = rule+ ; rule = ident ':' disjunction ';' ; -disjunction = conjunction ('|' conjunction)* ; +disjunction = + conjunction + '|' + ; conjunction = term+ ; term = basis repetition? ; basis = ident ; diff --git a/tank/metasyntax/lll-kort.html b/tank/metasyntax/lll-kort.html index 66d3457a..0448986a 100644 --- a/tank/metasyntax/lll-kort.html +++ b/tank/metasyntax/lll-kort.html @@ -15,12 +15,22 @@ border-collapse: collapse; background-color: #ECECEC; } -

                          Browsable LLL Grammar

                          CC-BY

                          Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                          Source used for this grammar: Jan Kort, The LLL grammar format (May 2003) GDK Reference Manual, Chapter 3, page 3

                          Summary

                          • Number of production rules: 9
                          • Number of top alternatives: 15
                          • Number of defined nonterminal symbols: 9
                          • Root nonterminal symbols: specification
                          • Other top nonterminal symbols: —
                          • Bottom nonterminal symbols: 2: ident, literal
                          • Number of used terminal symbols: 11
                          • Special terminal symbols: 11: ":", ";", "|", "%epsilon", "+", "*", "?", "{", "}", "(", ")"

                          Syntax

                          specification:
                          +		        

                          Browsable LLL Grammar

                          CC-BY

                          Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                          Source used for this grammar: Jan Kort, The LLL grammar format (May 2003) GDK Reference Manual, Chapter 3, page 3

                          Summary

                          • Number of production rules: 9
                          • Number of top alternatives: 15
                          • Number of defined nonterminal symbols: 9
                          • Root nonterminal symbols: specification
                          • Other top nonterminal symbols: —
                          • Bottom nonterminal symbols: —
                          • Number of used terminal symbols:

                          Syntax

                          specification:
                                   rule+
                           
                          rule:
                                   ident ":" disjunction ";"
                           
                          disjunction:
                          -        conjunction ("|" conjunction)*
                          +        {conjunction "|"}+
                           
                          conjunction:
                                   term+
                           
                          term:
                          @@ -41,5 +51,5 @@
                                   "(" disjunction ")"
                           

                          Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                          diff --git a/tank/metasyntax/lll-kort.rsc b/tank/metasyntax/lll-kort.rsc index 5db1eccd..3bc8b157 100644 --- a/tank/metasyntax/lll-kort.rsc +++ b/tank/metasyntax/lll-kort.rsc @@ -11,7 +11,10 @@ syntax Rule ; syntax Disjunction = - Conjunction ("|" Conjunction)* + + Conjunction + "|" + ; syntax Conjunction = diff --git a/tank/metasyntax/lll-kort.sdf b/tank/metasyntax/lll-kort.sdf index 790b2e04..92edbdcb 100644 --- a/tank/metasyntax/lll-kort.sdf +++ b/tank/metasyntax/lll-kort.sdf @@ -9,7 +9,10 @@ exports Ident ":" Disjunction ";" -> Rule - Conjunction ("|" Conjunction)* -> Disjunction + + Conjunction + "|" + -> Disjunction Term+ -> Conjunction diff --git a/tank/metasyntax/lll-ldta-reroot.prepared.html b/tank/metasyntax/lll-ldta-reroot.prepared.html index c912cd26..a217e42d 100644 --- a/tank/metasyntax/lll-ldta-reroot.prepared.html +++ b/tank/metasyntax/lll-ldta-reroot.prepared.html @@ -7,8 +7,18 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

                          reroot.prepared

                          Source: SLPS/topics/grammars/metasyntax/lll-ldta/reroot.prepared.xbgf

                          • reroot (grammar); +

                            reroot.prepared

                            Source: SLPS/topics/grammars/metasyntax/lll-ldta/reroot.prepared.xbgf


                            Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                            diff --git a/tank/metasyntax/lll-ldta.html b/tank/metasyntax/lll-ldta.html index f7bccae0..f0c9cea6 100644 --- a/tank/metasyntax/lll-ldta.html +++ b/tank/metasyntax/lll-ldta.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                            Browsable LLL Grammar

                            CC-BY

                            Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                            Source used for this grammar: Jan Kort, Ralf Lämmel, Chris Verhoef, The LLL grammar format (April 2002) GDK System Demo, page 2

                            Summary

                            • Number of production rules: 8
                            • Number of top alternatives: 11
                            • Number of defined nonterminal symbols: 8
                            • Root nonterminal symbols: grammar
                            • Other top nonterminal symbols: —
                            • Bottom nonterminal symbols: 2: sort, literal
                            • Number of used terminal symbols: 6
                            • Special terminal symbols: 6: ":", ";", "|", "*", "+", "?"

                            Syntax

                            grammar:
                            +		        

                            Browsable LLL Grammar

                            CC-BY

                            Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                            Source used for this grammar: Jan Kort, Ralf Lämmel, Chris Verhoef, The LLL grammar format (April 2002) GDK System Demo, page 2

                            Summary

                            • Number of production rules: 8
                            • Number of top alternatives: 11
                            • Number of defined nonterminal symbols: 8
                            • Root nonterminal symbols: grammar
                            • Other top nonterminal symbols: —
                            • Bottom nonterminal symbols: 2: sort, literal
                            • Number of used terminal symbols: 6
                            • Special terminal symbols: 6: ":", ";", "|", "*", "+", "?"

                            Syntax

                            grammar:
                                     rule+
                             
                            rule:
                                     sort ":" alts ";"
                            @@ -36,5 +46,5 @@
                                     "?"
                             

                            Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                            diff --git a/tank/metasyntax/rascal-horizontalize.html b/tank/metasyntax/rascal-horizontalize.html deleted file mode 100644 index 48525d60..00000000 --- a/tank/metasyntax/rascal-horizontalize.html +++ /dev/null @@ -1,72 +0,0 @@ - -Browsable Grammar Transformation

                            horizontalize

                            Source: SLPS/topics/grammars/metasyntax/rascal/horizontalize.xbgf


                            - Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. -
                            diff --git a/tank/metasyntax/rascal.bgf b/tank/metasyntax/rascal.bgf deleted file mode 100644 index 5d081c0b..00000000 --- a/tank/metasyntax/rascal.bgf +++ /dev/null @@ -1 +0,0 @@ -ModulePreModuleCommandModuleheaderHeaderbodyBodyHeadertagsTagsmodulenameQualifiedNameparamsModuleParametersimportsImportHeadertagsTagsmodulenameQualifiedNameimportsImportTagstagsTagTag@nameNamecontentsTagStringTag@nameNameTag@nameName=expressionExpressionExpression{statementsStatement}Expression(expressionExpression)ExpressiontypeTypeparametersParameters{statementsStatement}Expression[firstExpression,secondExpression..lastExpression]ExpressionparametersParameters{statementsStatement}ExpressionlabelLabelvisitVisitExpression(initExpression|resultExpression|generatorsExpression,Expression)ExpressionbasicTypeBasicType(argumentsExpression,Expression)ExpressionexpressionExpression(argumentsExpression,Expression)ExpressionliteralLiteralExpressionany(generatorsExpression,Expression)Expressionall(generatorsExpression,Expression)ExpressioncomprehensionComprehensionExpression{elementsExpression,Expression}Expression[elementsExpression,Expression]Expression#typeTypeExpression[firstExpression..lastExpression]Expression<elementsExpression,Expression>Expression(mappingsMapping,Mapping)ExpressionitExpressionqualifiedNameQualifiedNameExpressionexpressionExpression[subscriptsExpression,Expression]ExpressionexpressionExpression.fieldNameExpressionexpressionExpression[keyName=replacementExpression]ExpressionexpressionExpression<fieldsField,Field>ExpressionargumentExpression?Expression!argumentExpressionExpression-argumentExpressionExpressionargumentExpression+ExpressionargumentExpression*ExpressionexpressionExpression[@nameName=valueExpression]ExpressionexpressionExpression@nameNameExpressionlhsExpressionorhsExpressionExpressionlhsExpression*rhsExpressionExpressionlhsExpressionjoinrhsExpressionExpressionlhsExpression%rhsExpressionExpressionlhsExpression/rhsExpressionExpressionlhsExpression&rhsExpressionExpressionlhsExpression+rhsExpressionExpressionlhsExpression-rhsExpressionExpressionlhsExpressionnotinrhsExpressionExpressionlhsExpressioninrhsExpressionExpressionlhsExpression>=rhsExpressionExpressionlhsExpression<=rhsExpressionExpressionlhsExpression<rhsExpressionExpressionlhsExpression>rhsExpressionExpressionconditionExpression?thenExpExpression:elseExpExpressionExpressionlhsExpression==rhsExpressionExpressionlhsExpression!=rhsExpressionExpressionlhsExpression?rhsExpressionExpressionpatternPattern!:=expressionExpressionExpressionpatternPattern:=expressionExpressionExpressionpatternPattern<-expressionExpressionExpressionlhsExpression==>rhsExpressionExpressionlhsExpression<==>rhsExpressionExpressionlhsExpression&&rhsExpressionExpressionlhsExpression||rhsExpressionStatementassertexpressionExpression;StatementassertexpressionExpression:messageExpression;StatementexpressionExpression;StatementlabelLabelvisitVisitStatementlabelLabelwhile(conditionsExpression,Expression)bodyStatementStatementlabelLabeldobodyStatementwhile(conditionExpression);StatementlabelLabelfor(generatorsExpression,Expression)bodyStatementStatementlabelLabelif(conditionsExpression,Expression)thenStatementStatementnoElseMayFollowNoElseMayFollowStatementlabelLabelif(conditionsExpression,Expression)thenStatementStatementelseelseStatementStatementStatementlabelLabelswitch(expressionExpression){casesCase}StatementfailtargetTarget;StatementbreaktargetTarget;StatementcontinuetargetTarget;Statementsolve(variablesQualifiedName,QualifiedNameboundBound)bodyStatementStatementtrybodyStatementhandlersCatchStatementtrybodyStatementhandlersCatchfinallyfinallyBodyStatementStatementlabelLabel{statementsStatement}Statement;StatementglobaltypeTypenamesQualifiedName,QualifiedName;StatementassignableAssignableoperatorAssignmentstatementStatementStatementreturnstatementStatementStatementthrowstatementStatementStatementinsertdataTargetDataTargetstatementStatementStatementappenddataTargetDataTargetstatementStatementStatementfunctionDeclarationFunctionDeclarationStatementdeclarationLocalVariableDeclaration;LabelnameName:LabelVisitstrategyStrategyvisit(subjectExpression){casesCase}Visitvisit(subjectExpression){casesCase}Strategytop-down-breakStrategytop-downStrategybottom-upStrategybottom-up-breakStrategyoutermostStrategyinnermostCasecasepatternWithActionPatternWithActionCasedefault:statementStatementPatternWithActionpatternPattern=>replacementReplacementPatternWithActionpatternPattern:statementStatementPattern{elementsPattern,Pattern}Pattern[elementsPattern,Pattern]PatternqualifiedNameQualifiedNamePatternqualifiedNameQualifiedName*PatternliteralLiteralPattern<elementsPattern,Pattern>PatterntypeTypenameNamePattern(mappingsMapping,Mapping)PatternbasicTypeBasicType(argumentsPattern,Pattern)PatternexpressionPattern(argumentsPattern,Pattern)PatternnameName:patternPatternPattern[typeType]patternPatternPattern/patternPatternPattern!patternPatternPatterntypeTypenameName:patternPatternQualifiedNamenamesName::NameLiteralintegerLiteralIntegerLiteralLiteralregExpLiteralRegExpLiteralLiteralrealLiteralRealLiteralLiteralbooleanLiteralBooleanLiteralLiteralstringLiteralStringLiteralLiteraldateTimeLiteralDateTimeLiteralLiterallocationLiteralLocationLiteralIntegerLiteraldecimalDecimalIntegerLiteralIntegerLiteralhexHexIntegerLiteralIntegerLiteraloctalOctalIntegerLiteralStringLiteralprePreStringCharstemplateStringTemplatetailStringTailStringLiteralprePreStringCharsexpressionExpressiontailStringTailStringLiteralconstantStringConstantStringTemplateif(conditionsExpression,Expression){preStatsStatementbodyStringMiddlepostStatsStatement}StringTemplateif(conditionsExpression,Expression){preStatsThenStatementthenStringStringMiddlepostStatsThenStatement}else{preStatsElseStatementelseStringStringMiddlepostStatsElseStatement}StringTemplatefor(generatorsExpression,Expression){preStatsStatementbodyStringMiddlepostStatsStatement}StringTemplatedo{preStatsStatementbodyStringMiddlepostStatsStatement}while(conditionExpression)StringTemplatewhile(conditionExpression){preStatsStatementbodyStringMiddlepostStatsStatement}StringMiddlemidMidStringCharsStringMiddlemidMidStringCharstemplateStringTemplatetailStringMiddleStringMiddlemidMidStringCharsexpressionExpressiontailStringMiddleStringTailmidMidStringCharsexpressionExpressiontailStringTailStringTailpostPostStringCharsStringTailmidMidStringCharstemplateStringTemplatetailStringTailDateTimeLiteraldateJustDateDateTimeLiteraltimeJustTimeDateTimeLiteraldateAndTimeDateAndTimeLocationLiteralprotocolPartProtocolPartpathPartPathPartProtocolPartprotocolCharsProtocolCharsProtocolPartprePreProtocolCharsexpressionExpressiontailProtocolTailProtocolTailmidMidProtocolCharsexpressionExpressiontailProtocolTailProtocolTailpostPostProtocolCharsPathPartpathCharsPathCharsPathPartprePrePathCharsexpressionExpressiontailPathTailPathTailmidMidPathCharsexpressionExpressiontailPathTailPathTailpostPostPathCharsType(typeType)TypeuserUserTypeTypefunctionFunctionTypeTypestructuredStructuredTypeTypebasicBasicTypeTypeselectorDataTypeSelectorTypetypeVarTypeVarTypesymbolSymbolUserTypenameQualifiedNameUserTypenameQualifiedName[parametersType,Type]FunctionTypetypeType(argumentsTypeArg,TypeArg)TypeArgtypeTypeTypeArgtypeTypenameNameStructuredTypebasicTypeBasicType[argumentsTypeArg,TypeArg]BasicTypevalueBasicTypelocBasicTypenodeBasicTypenumBasicTypetypeBasicTypebagBasicTypeintBasicTyperelBasicTypeparameterBasicTyperealBasicTypefunBasicTypetupleBasicTypestrBasicTypeboolBasicTypereifiedBasicTypevoidBasicTypenon-terminalBasicTypedatetimeBasicTypesetBasicTypemapBasicTypeconstructorBasicTypelistBasicTypeadtBasicTypelexDataTypeSelectorsortQualifiedName.productionNameTypeVar&nameNameTypeVar&nameName<:boundTypeSymbol{symbolSymbolsepStrCon}+Symbol{symbolSymbolsepStrCon}*Symbol(headSymboltailSymbol)Symbol()SymbolsingelQuotedStringSingleQuotedStrConSymbolstringStrConSymbolcharClassCharClassSymbolsymbolSymbol?SymbolsymbolSymbol+SymbolsymbolSymbol*SymbolnameQualifiedNameSymbollhsSymbol|rhsSymbolCharClass(charClassCharClass)CharClass[optionalCharRangesOptCharRanges]CharClass~charClassCharClassCharClasslhsCharClass/rhsCharClassCharClasslhsCharClass/\rhsCharClassCharClasslhsCharClass\/rhsCharClassOptCharRangesrangesCharRangesOptCharRangesCharRangeslhsCharRangesrhsCharRangesCharRangesrangeCharRangeCharRanges(rangesCharRanges)CharRangecharacterCharacterCharRangestartCharacter-endCharacterCharacternumCharNumCharCharacter\EOFCharactershortCharShortCharCharacter\BOTCharacter\TOPMappingfrom&T:to&TReplacementreplacementExpressionExpressionReplacementreplacementExpressionExpressionwhenconditionsExpression,ExpressionNoElseMayFollowTargetTargetnameNameBound;expressionExpressionBoundCatchcatch:bodyStatementCatchcatchpatternPattern:bodyStatementAssignable(argAssignable)AssignablequalifiedNameQualifiedNameAssignablereceiverAssignable[subscriptExpression]AssignablereceiverAssignable.fieldNameAssignablereceiverAssignable?defaultExpressionExpressionAssignablenameName(argumentsAssignable,Assignable)Assignable<elementsAssignable,Assignable>AssignablereceiverAssignable@annotationNameAssignment?=Assignment/=Assignment*=Assignment&=Assignment-=Assignment=Assignment+=DataTargetDataTargetlabelName:FunctionDeclarationtagsTagsvisibilityVisibilitysignatureSignature;FunctionDeclarationtagsTagsvisibilityVisibilitysignatureSignaturebodyFunctionBodyVisibilityprivateVisibilityVisibilitypublicSignaturetypeTypemodifiersFunctionModifiersnameNameparametersParametersthrowsexceptionsType,TypeSignaturetypeTypemodifiersFunctionModifiersnameNameparametersParametersFunctionModifiersmodifiersFunctionModifierFunctionModifierjavaParameters(formalsFormals)Parameters(formalsFormals...)FormalsformalsFormal,FormalFormaltypeTypenameNameFunctionBody{statementsStatement}LocalVariableDeclarationdeclaratorDeclaratorLocalVariableDeclarationdynamicdeclaratorDeclaratorDeclaratortypeTypevariablesVariable,VariableVariablenameName=initialExpressionVariablenameNameComprehension{resultsExpression,Expression|generatorsExpression,Expression}Comprehension(fromExpression:toExpression|generatorsExpression,Expression)Comprehension[resultsExpression,Expression|generatorsExpression,Expression]FieldfieldIndexIntegerLiteralFieldfieldNameNameModuleParameters[parametersTypeVar,TypeVar]ImportextendmoduleImportedModule;ImportimportmoduleImportedModule;ImportsyntaxSyntaxDefinitionImportedModulenameQualifiedNameImportedModulenameQualifiedNameactualsModuleActualsrenamingsRenamingsImportedModulenameQualifiedNamerenamingsRenamingsImportedModulenameQualifiedNameactualsModuleActualsModuleActuals[typesType,Type]RenamingsrenamingrenamingsRenaming,RenamingRenamingfromName=>toNameSyntaxDefinitionlayoutdefinedSym=productionProd;SyntaxDefinitionstartStartsyntaxdefinedSym=productionProd;SymsymbolSym+Sym{symbolSymsepStringConstant}+Sym@columnIntegerLiteralSymcharClassClassSymstringStringConstantSym$SymsymbolSymlabelNonterminalLabelSymnonterminalNonterminalSym&nonterminalNonterminalSymsymbolSym*SympnonterminalParameterizedNonterminal[parametersSym,Sym]SymsymbolSym?Sym{symbolSymsepStringConstant}*SymcistringCaseInsensitiveStringConstantSym^Class[rangesRange]Class!charClassClassClasslhsClass-rhsClassClasslhsClass&&rhsClassClasslhsClass||rhsClassClass(charclassClass)RangestartChar-endCharRangecharacterCharProd:referencedNameProdprodProdactionLanguageActionProdmodifiersProdModifiernameName:argsSymProd...ProdmodifiersProdModifierargsSymProdassociativityAssoc(groupProd)ProdlhsProd-rhsProdProdlhsProd#rhsProdProdlhsProd|rhsProdProdlhsProd>rhsProdLanguageAction=>expressionExpressionLanguageAction{statementsStatement}ProdModifierassociativityAssocProdModifierbracketProdModifierlexAssocassocAssocleftAssocnon-assocAssocrightStartStartstartBodytoplevelsToplevelTopleveldeclarationDeclarationDeclarationtagsTagsvisibilityVisibilitytypeTypevariablesVariable,Variable;DeclarationtagsTagsvisibilityVisibilityannoannoTypeTypeonTypeType@nameName;DeclarationtagsTagsvisibilityVisibilityviewviewName<:superTypeName=altsAlternative|Alternative;DeclarationtagsTagsvisibilityVisibilityaliasuserUserType=baseType;DeclarationtagsTagsvisibilityVisibilitytagkindKindnameNameontypesType,Type;DeclarationtagsTagsvisibilityVisibilitydatauserUserType;DeclarationtagsTagsvisibilityVisibilitydatauserUserType=variantsVariant|Variant;DeclarationtagsTagsrulenameNamepatternActionPatternWithAction;DeclarationfunctionDeclarationFunctionDeclarationDeclarationtestTest;AlternativenameNametypeTypeKindfunctionKindvariableKindallKindannoKinddataKindviewKindruleKindaliasKindmoduleKindtagVariantnameName(argumentsTypeArg,TypeArg)TesttagsTagstestexpressionExpression:labeledStringLiteralTesttagsTagstestexpressionExpressionPreModuleheaderHeaderMarkerRestRestWord*;CommandexpressionExpressionCommanddeclarationDeclarationCommand:commandShellCommandCommandstatementStatementCommandimportedImportShellCommandsetnameQualifiedNameexpressionExpressionShellCommandundeclarenameQualifiedNameShellCommandhelpShellCommandeditnameQualifiedNameShellCommandunimportnameQualifiedNameShellCommanddeclarationsShellCommandquitShellCommandhistoryShellCommandtestShellCommandmodules \ No newline at end of file diff --git a/tank/metasyntax/rascal.bnf b/tank/metasyntax/rascal.bnf deleted file mode 100644 index 1fe32cef..00000000 --- a/tank/metasyntax/rascal.bnf +++ /dev/null @@ -1,756 +0,0 @@ -[Default] Module: - header::Header body::Body -[Parameters] Header: - tags::Tags "module" name::QualifiedName params::ModuleParameters imports::(Import*) -[Default] Header: - tags::Tags "module" name::QualifiedName imports::(Import*) -[Default] Tags: - tags::(Tag*) -[Default] Tag: - "@" name::Name contents::TagString -[Empty] Tag: - "@" name::Name -[Expression] Tag: - "@" name::Name "=" expression::Expression -[NonEmptyBlock] Expression: - "{" statements::(Statement+) "}" -[Bracket] Expression: - "(" expression::Expression ")" -[Closure] Expression: - type::Type parameters::Parameters "{" statements::(Statement+) "}" -[StepRange] Expression: - "[" first::Expression "," second::Expression ".." last::Expression "]" -[VoidClosure] Expression: - parameters::Parameters "{" statements::(Statement*) "}" -[Visit] Expression: - label::Label visit::Visit -[Reducer] Expression: - "(" init::Expression "|" result::Expression "|" generators::(Expression ("," Expression)*) ")" -[ReifiedType] Expression: - basicType::BasicType "(" arguments::((Expression ("," Expression)*)?) ")" -[CallOrTree] Expression: - expression::Expression "(" arguments::((Expression ("," Expression)*)?) ")" -[Literal] Expression: - literal::Literal -[Any] Expression: - "any" "(" generators::(Expression ("," Expression)*) ")" -[All] Expression: - "all" "(" generators::(Expression ("," Expression)*) ")" -[Comprehension] Expression: - comprehension::Comprehension -[Set] Expression: - "{" elements::((Expression ("," Expression)*)?) "}" -[List] Expression: - "[" elements::((Expression ("," Expression)*)?) "]" -[ReifyType] Expression: - "#" type::Type -[Range] Expression: - "[" first::Expression ".." last::Expression "]" -[Tuple] Expression: - "<" elements::(Expression ("," Expression)*) ">" -[Map] Expression: - "(" mappings::((Mapping ("," Mapping)*)?) ")" -[It] Expression: - "it" -[QualifiedName] Expression: - qualifiedName::QualifiedName -[Subscript] Expression: - expression::Expression "[" subscripts::(Expression ("," Expression)*) "]" -[FieldAccess] Expression: - expression::Expression "." field::Name -[FieldUpdate] Expression: - expression::Expression "[" key::Name "=" replacement::Expression "]" -[FieldProject] Expression: - expression::Expression "<" fields::(Field ("," Field)*) ">" -[IsDefined] Expression: - argument::Expression "?" -[Negation] Expression: - "!" argument::Expression -[Negative] Expression: - "-" argument::Expression -[TransitiveClosure] Expression: - argument::Expression "+" -[TransitiveReflexiveClosure] Expression: - argument::Expression "*" -[SetAnnotation] Expression: - expression::Expression "[" "@" name::Name "=" value::Expression "]" -[GetAnnotation] Expression: - expression::Expression "@" name::Name -[Composition] Expression: - lhs::Expression "o" rhs::Expression -[Product] Expression: - lhs::Expression "*" rhs::Expression -[Join] Expression: - lhs::Expression "join" rhs::Expression -[Modulo] Expression: - lhs::Expression "%" rhs::Expression -[Division] Expression: - lhs::Expression "/" rhs::Expression -[Intersection] Expression: - lhs::Expression "&" rhs::Expression -[Addition] Expression: - lhs::Expression "+" rhs::Expression -[Subtraction] Expression: - lhs::Expression "-" rhs::Expression -[NotIn] Expression: - lhs::Expression "notin" rhs::Expression -[In] Expression: - lhs::Expression "in" rhs::Expression -[GreaterThanOrEq] Expression: - lhs::Expression ">=" rhs::Expression -[LessThanOrEq] Expression: - lhs::Expression "<=" rhs::Expression -[LessThan] Expression: - lhs::Expression "<" rhs::Expression -[GreaterThan] Expression: - lhs::Expression ">" rhs::Expression -[IfThenElse] Expression: - condition::Expression "?" thenExp::Expression ":" elseExp::Expression -[Equals] Expression: - lhs::Expression "==" rhs::Expression -[NonEquals] Expression: - lhs::Expression "!=" rhs::Expression -[IfDefinedOtherwise] Expression: - lhs::Expression "?" rhs::Expression -[NoMatch] Expression: - pattern::Pattern "!:=" expression::Expression -[Match] Expression: - pattern::Pattern ":=" expression::Expression -[Enumerator] Expression: - pattern::Pattern "<-" expression::Expression -[Implication] Expression: - lhs::Expression "==>" rhs::Expression -[Equivalence] Expression: - lhs::Expression "<==>" rhs::Expression -[And] Expression: - lhs::Expression "&&" rhs::Expression -[Or] Expression: - lhs::Expression "||" rhs::Expression -[Assert] Statement: - "assert" expression::Expression ";" -[AssertWithMessage] Statement: - "assert" expression::Expression ":" message::Expression ";" -[Expression] Statement: - expression::Expression ";" -[Visit] Statement: - label::Label visit::Visit -[While] Statement: - label::Label "while" "(" conditions::(Expression ("," Expression)*) ")" body::Statement -[DoWhile] Statement: - label::Label "do" body::Statement "while" "(" condition::Expression ")" ";" -[For] Statement: - label::Label "for" "(" generators::(Expression ("," Expression)*) ")" body::Statement -[IfThen] Statement: - label::Label "if" "(" conditions::(Expression ("," Expression)*) ")" thenStatement::Statement noElseMayFollow::NoElseMayFollow -[IfThenElse] Statement: - label::Label "if" "(" conditions::(Expression ("," Expression)*) ")" thenStatement::Statement "else" elseStatement::Statement -[Switch] Statement: - label::Label "switch" "(" expression::Expression ")" "{" cases::(Case+) "}" -[Fail] Statement: - "fail" target::Target ";" -[Break] Statement: - "break" target::Target ";" -[Continue] Statement: - "continue" target::Target ";" -[Solve] Statement: - "solve" "(" variables::(QualifiedName ("," QualifiedName)*) bound::Bound ")" body::Statement -[Try] Statement: - "try" body::Statement handlers::(Catch+) -[TryFinally] Statement: - "try" body::Statement handlers::(Catch+) "finally" finallyBody::Statement -[NonEmptyBlock] Statement: - label::Label "{" statements::(Statement+) "}" -[EmptyStatement] Statement: - ";" -[GlobalDirective] Statement: - "global" type::Type names::(QualifiedName ("," QualifiedName)*) ";" -[Assignment] Statement: - assignable::Assignable operator::Assignment statement::Statement -[Return] Statement: - "return" statement::Statement -[Throw] Statement: - "throw" statement::Statement -[Insert] Statement: - "insert" dataTarget::DataTarget statement::Statement -[Append] Statement: - "append" dataTarget::DataTarget statement::Statement -[FunctionDeclaration] Statement: - functionDeclaration::FunctionDeclaration -[VariableDeclaration] Statement: - declaration::LocalVariableDeclaration ";" -[Default] Label: - name::Name ":" -[Empty] Label: - EPSILON -[GivenStrategy] Visit: - strategy::Strategy "visit" "(" subject::Expression ")" "{" cases::(Case+) "}" -[DefaultStrategy] Visit: - "visit" "(" subject::Expression ")" "{" cases::(Case+) "}" -[TopDownBreak] Strategy: - "top-down-break" -[TopDown] Strategy: - "top-down" -[BottomUp] Strategy: - "bottom-up" -[BottomUpBreak] Strategy: - "bottom-up-break" -[Outermost] Strategy: - "outermost" -[Innermost] Strategy: - "innermost" -[PatternWithAction] Case: - "case" patternWithAction::PatternWithAction -[Default] Case: - "default" ":" statement::Statement -[Replacing] PatternWithAction: - pattern::Pattern "=>" replacement::Replacement -[Arbitrary] PatternWithAction: - pattern::Pattern ":" statement::Statement -[Set] Pattern: - "{" elements::((Pattern ("," Pattern)*)?) "}" -[List] Pattern: - "[" elements::((Pattern ("," Pattern)*)?) "]" -[QualifiedName] Pattern: - qualifiedName::QualifiedName -[MultiVariable] Pattern: - qualifiedName::QualifiedName "*" -[Literal] Pattern: - literal::Literal -[Tuple] Pattern: - "<" elements::(Pattern ("," Pattern)*) ">" -[TypedVariable] Pattern: - type::Type name::Name -[Map] Pattern: - "(" mappings::((Mapping ("," Mapping)*)?) ")" -[ReifiedType] Pattern: - basicType::BasicType "(" arguments::((Pattern ("," Pattern)*)?) ")" -[CallOrTree] Pattern: - expression::Pattern "(" arguments::((Pattern ("," Pattern)*)?) ")" -[VariableBecomes] Pattern: - name::Name ":" pattern::Pattern -[Guarded] Pattern: - "[" type::Type "]" pattern::Pattern -[Descendant] Pattern: - "/" pattern::Pattern -[Anti] Pattern: - "!" pattern::Pattern -[TypedVariableBecomes] Pattern: - type::Type name::Name ":" pattern::Pattern -[Default] QualifiedName: - names::(Name ("::" Name)*) -[Integer] Literal: - integerLiteral::IntegerLiteral -[RegExp] Literal: - regExpLiteral::RegExpLiteral -[Real] Literal: - realLiteral::RealLiteral -[Boolean] Literal: - booleanLiteral::BooleanLiteral -[String] Literal: - stringLiteral::StringLiteral -[DateTime] Literal: - dateTimeLiteral::DateTimeLiteral -[Location] Literal: - locationLiteral::LocationLiteral -[DecimalIntegerLiteral] IntegerLiteral: - decimal::DecimalIntegerLiteral -[HexIntegerLiteral] IntegerLiteral: - hex::HexIntegerLiteral -[OctalIntegerLiteral] IntegerLiteral: - octal::OctalIntegerLiteral -[Template] StringLiteral: - pre::PreStringChars template::StringTemplate tail::StringTail -[Interpolated] StringLiteral: - pre::PreStringChars expression::Expression tail::StringTail -[NonInterpolated] StringLiteral: - constant::StringConstant -[IfThen] StringTemplate: - "if" "(" conditions::(Expression ("," Expression)*) ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" -[IfThenElse] StringTemplate: - "if" "(" conditions::(Expression ("," Expression)*) ")" "{" preStatsThen::(Statement*) thenString::StringMiddle postStatsThen::(Statement*) "}" "else" "{" preStatsElse::(Statement*) elseString::StringMiddle postStatsElse::(Statement*) "}" -[For] StringTemplate: - "for" "(" generators::(Expression ("," Expression)*) ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" -[DoWhile] StringTemplate: - "do" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" "while" "(" condition::Expression ")" -[While] StringTemplate: - "while" "(" condition::Expression ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" -[Mid] StringMiddle: - mid::MidStringChars -[Template] StringMiddle: - mid::MidStringChars template::StringTemplate tail::StringMiddle -[Interpolated] StringMiddle: - mid::MidStringChars expression::Expression tail::StringMiddle -[MidInterpolated] StringTail: - mid::MidStringChars expression::Expression tail::StringTail -[Post] StringTail: - post::PostStringChars -[MidTemplate] StringTail: - mid::MidStringChars template::StringTemplate tail::StringTail -[DateLiteral] DateTimeLiteral: - date::JustDate -[TimeLiteral] DateTimeLiteral: - time::JustTime -[DateAndTimeLiteral] DateTimeLiteral: - dateAndTime::DateAndTime -[Default] LocationLiteral: - protocolPart::ProtocolPart pathPart::PathPart -[NonInterpolated] ProtocolPart: - protocolChars::ProtocolChars -[Interpolated] ProtocolPart: - pre::PreProtocolChars expression::Expression tail::ProtocolTail -[Mid] ProtocolTail: - mid::MidProtocolChars expression::Expression tail::ProtocolTail -[Post] ProtocolTail: - post::PostProtocolChars -[NonInterpolated] PathPart: - pathChars::PathChars -[Interpolated] PathPart: - pre::PrePathChars expression::Expression tail::PathTail -[Mid] PathTail: - mid::MidPathChars expression::Expression tail::PathTail -[Post] PathTail: - post::PostPathChars -[Bracket] Type: - "(" type::Type ")" -[User] Type: - user::UserType -[Function] Type: - function::FunctionType -[Structured] Type: - structured::StructuredType -[Basic] Type: - basic::BasicType -[Selector] Type: - selector::DataTypeSelector -[Variable] Type: - typeVar::TypeVar -[Symbol] Type: - symbol::Symbol -[Name] UserType: - name::QualifiedName -[Parametric] UserType: - name::QualifiedName "[" parameters::(Type ("," Type)*) "]" -[TypeArguments] FunctionType: - type::Type "(" arguments::((TypeArg ("," TypeArg)*)?) ")" -[Default] TypeArg: - type::Type -[Named] TypeArg: - type::Type name::Name -[Default] StructuredType: - basicType::BasicType "[" arguments::(TypeArg ("," TypeArg)*) "]" -[Value] BasicType: - "value" -[Loc] BasicType: - "loc" -[Node] BasicType: - "node" -[Num] BasicType: - "num" -[ReifiedType] BasicType: - "type" -[Bag] BasicType: - "bag" -[Int] BasicType: - "int" -[Relation] BasicType: - "rel" -[ReifiedTypeParameter] BasicType: - "parameter" -[Real] BasicType: - "real" -[ReifiedFunction] BasicType: - "fun" -[Tuple] BasicType: - "tuple" -[String] BasicType: - "str" -[Bool] BasicType: - "bool" -[ReifiedReifiedType] BasicType: - "reified" -[Void] BasicType: - "void" -[ReifiedNonTerminal] BasicType: - "non-terminal" -[DateTime] BasicType: - "datetime" -[Set] BasicType: - "set" -[Map] BasicType: - "map" -[ReifiedConstructor] BasicType: - "constructor" -[List] BasicType: - "list" -[ReifiedAdt] BasicType: - "adt" -[Lex] BasicType: - "lex" -[Selector] DataTypeSelector: - sort::QualifiedName "." production::Name -[Free] TypeVar: - "&" name::Name -[Bounded] TypeVar: - "&" name::Name "<:" bound::Type -[IterSep] Symbol: - "{" symbol::Symbol sep::StrCon "}" "+" -[IterStarSep] Symbol: - "{" symbol::Symbol sep::StrCon "}" "*" -[Sequence] Symbol: - "(" head::Symbol tail::(Symbol+) ")" -[Empty] Symbol: - "(" ")" -[CaseInsensitiveLiteral] Symbol: - singelQuotedString::SingleQuotedStrCon -[Literal] Symbol: - string::StrCon -[CharacterClass] Symbol: - charClass::CharClass -[Optional] Symbol: - symbol::Symbol "?" -[Iter] Symbol: - symbol::Symbol "+" -[IterStar] Symbol: - symbol::Symbol "*" -[Sort] Symbol: - name::QualifiedName -[Alternative] Symbol: - lhs::Symbol "|" rhs::Symbol -[Bracket] CharClass: - "(" charClass::CharClass ")" -[SimpleCharclass] CharClass: - "[" optionalCharRanges::OptCharRanges "]" -[Complement] CharClass: - "~" charClass::CharClass -[Difference] CharClass: - lhs::CharClass "/" rhs::CharClass -[Intersection] CharClass: - lhs::CharClass "/\" rhs::CharClass -[Union] CharClass: - lhs::CharClass "\/" rhs::CharClass -[Present] OptCharRanges: - ranges::CharRanges -[Absent] OptCharRanges: - EPSILON -[Concatenate] CharRanges: - lhs::CharRanges rhs::CharRanges -[Range] CharRanges: - range::CharRange -[Bracket] CharRanges: - "(" ranges::CharRanges ")" -[Character] CharRange: - character::Character -[Range] CharRange: - start::Character "-" end::Character -[Numeric] Character: - numChar::NumChar -[EOF] Character: - "\EOF" -[Short] Character: - shortChar::ShortChar -[Bottom] Character: - "\BOT" -[Top] Character: - "\TOP" -[Default] Mapping: - from::&T ":" to::&T -[Unconditional] Replacement: - replacementExpression::Expression -[Conditional] Replacement: - replacementExpression::Expression "when" conditions::(Expression ("," Expression)*) -[Default] NoElseMayFollow: - EPSILON -[Empty] Target: - EPSILON -[Labeled] Target: - name::Name -[Default] Bound: - ";" expression::Expression -[Empty] Bound: - EPSILON -[Default] Catch: - "catch" ":" body::Statement -[Binding] Catch: - "catch" pattern::Pattern ":" body::Statement -[Bracket] Assignable: - "(" arg::Assignable ")" -[Variable] Assignable: - qualifiedName::QualifiedName -[Subscript] Assignable: - receiver::Assignable "[" subscript::Expression "]" -[FieldAccess] Assignable: - receiver::Assignable "." field::Name -[IfDefinedOrDefault] Assignable: - receiver::Assignable "?" defaultExpression::Expression -[Constructor] Assignable: - name::Name "(" arguments::(Assignable ("," Assignable)*) ")" -[Tuple] Assignable: - "<" elements::(Assignable ("," Assignable)*) ">" -[Annotation] Assignable: - receiver::Assignable "@" annotation::Name -[IfDefined] Assignment: - "?=" -[Division] Assignment: - "/=" -[Product] Assignment: - "*=" -[Intersection] Assignment: - "&=" -[Subtraction] Assignment: - "-=" -[Default] Assignment: - "=" -[Addition] Assignment: - "+=" -[Empty] DataTarget: - EPSILON -[Labeled] DataTarget: - label::Name ":" -[Abstract] FunctionDeclaration: - tags::Tags visibility::Visibility signature::Signature ";" -[Default] FunctionDeclaration: - tags::Tags visibility::Visibility signature::Signature body::FunctionBody -[Private] Visibility: - "private" -[Default] Visibility: - EPSILON -[Public] Visibility: - "public" -[WithThrows] Signature: - type::Type modifiers::FunctionModifiers name::Name parameters::Parameters "throws" exceptions::(Type ("," Type)*) -[NoThrows] Signature: - type::Type modifiers::FunctionModifiers name::Name parameters::Parameters -[List] FunctionModifiers: - modifiers::(FunctionModifier*) -[Java] FunctionModifier: - "java" -[Default] Parameters: - "(" formals::Formals ")" -[VarArgs] Parameters: - "(" formals::Formals "..." ")" -[Default] Formals: - formals::((Formal ("," Formal)*)?) -[TypeName] Formal: - type::Type name::Name -[Default] FunctionBody: - "{" statements::(Statement*) "}" -[Default] LocalVariableDeclaration: - declarator::Declarator -[Dynamic] LocalVariableDeclaration: - "dynamic" declarator::Declarator -[Default] Declarator: - type::Type variables::(Variable ("," Variable)*) -[Initialized] Variable: - name::Name "=" initial::Expression -[UnInitialized] Variable: - name::Name -[Set] Comprehension: - "{" results::(Expression ("," Expression)*) "|" generators::(Expression ("," Expression)*) "}" -[Map] Comprehension: - "(" from::Expression ":" to::Expression "|" generators::(Expression ("," Expression)*) ")" -[List] Comprehension: - "[" results::(Expression ("," Expression)*) "|" generators::(Expression ("," Expression)*) "]" -[Index] Field: - fieldIndex::IntegerLiteral -[Name] Field: - fieldName::Name -[Default] ModuleParameters: - "[" parameters::(TypeVar ("," TypeVar)*) "]" -[Extend] Import: - "extend" module::ImportedModule ";" -[Default] Import: - "import" module::ImportedModule ";" -[Syntax] Import: - syntax::SyntaxDefinition -[Default] ImportedModule: - name::QualifiedName -[ActualsRenaming] ImportedModule: - name::QualifiedName actuals::ModuleActuals renamings::Renamings -[Renamings] ImportedModule: - name::QualifiedName renamings::Renamings -[Actuals] ImportedModule: - name::QualifiedName actuals::ModuleActuals -[Default] ModuleActuals: - "[" types::(Type ("," Type)*) "]" -[Default] Renamings: - "renaming" renamings::(Renaming ("," Renaming)*) -[Default] Renaming: - from::Name "=>" to::Name -[Layout] SyntaxDefinition: - "layout" defined::Sym "=" production::Prod ";" -[Language] SyntaxDefinition: - start::Start "syntax" defined::Sym "=" production::Prod ";" -[Iter] Sym: - symbol::Sym "+" -[IterSep] Sym: - "{" symbol::Sym sep::StringConstant "}" "+" -[Column] Sym: - "@" column::IntegerLiteral -[CharacterClass] Sym: - charClass::Class -[Literal] Sym: - string::StringConstant -[EndOfLine] Sym: - "$" -[Labeled] Sym: - symbol::Sym label::NonterminalLabel -[Nonterminal] Sym: - nonterminal::Nonterminal -[Parameter] Sym: - "&" nonterminal::Nonterminal -[IterStar] Sym: - symbol::Sym "*" -[Parametrized] Sym: - pnonterminal::ParameterizedNonterminal "[" parameters::(Sym ("," Sym)*) "]" -[Optional] Sym: - symbol::Sym "?" -[IterStarSep] Sym: - "{" symbol::Sym sep::StringConstant "}" "*" -[CaseInsensitiveLiteral] Sym: - cistring::CaseInsensitiveStringConstant -[StartOfLine] Sym: - "^" -[SimpleCharclass] Class: - "[" ranges::(Range*) "]" -[Complement] Class: - "!" charClass::Class -[Difference] Class: - lhs::Class "-" rhs::Class -[Intersection] Class: - lhs::Class "&&" rhs::Class -[Union] Class: - lhs::Class "||" rhs::Class -[Bracket] Class: - "(" charclass::Class ")" -[FromTo] Range: - start::Char "-" end::Char -[Character] Range: - character::Char -[Reference] Prod: - ":" referenced::Name -[Action] Prod: - prod::Prod action::LanguageAction -[Labeled] Prod: - modifiers::(ProdModifier*) name::Name ":" args::(Sym*) -[Others] Prod: - "..." -[Unlabeled] Prod: - modifiers::(ProdModifier*) args::(Sym*) -[AssociativityGroup] Prod: - associativity::Assoc "(" group::Prod ")" -[Reject] Prod: - lhs::Prod "-" rhs::Prod -[Follow] Prod: - lhs::Prod "#" rhs::Prod -[All] Prod: - lhs::Prod "|" rhs::Prod -[First] Prod: - lhs::Prod ">" rhs::Prod -[Build] LanguageAction: - "=>" expression::Expression -[Action] LanguageAction: - "{" statements::(Statement*) "}" -[Associativity] ProdModifier: - associativity::Assoc -[Bracket] ProdModifier: - "bracket" -[Lexical] ProdModifier: - "lex" -[Associative] Assoc: - "assoc" -[Left] Assoc: - "left" -[NonAssociative] Assoc: - "non-assoc" -[Right] Assoc: - "right" -[Absent] Start: - EPSILON -[Present] Start: - "start" -[Toplevels] Body: - toplevels::(Toplevel*) -[GivenVisibility] Toplevel: - declaration::Declaration -[Variable] Declaration: - tags::Tags visibility::Visibility type::Type variables::(Variable ("," Variable)*) ";" -[Annotation] Declaration: - tags::Tags visibility::Visibility "anno" annoType::Type onType::Type "@" name::Name ";" -[View] Declaration: - tags::Tags visibility::Visibility "view" view::Name "<:" superType::Name "=" alts::(Alternative ("|" Alternative)*) ";" -[Alias] Declaration: - tags::Tags visibility::Visibility "alias" user::UserType "=" base::Type ";" -[Tag] Declaration: - tags::Tags visibility::Visibility "tag" kind::Kind name::Name "on" types::(Type ("," Type)*) ";" -[DataAbstract] Declaration: - tags::Tags visibility::Visibility "data" user::UserType ";" -[Data] Declaration: - tags::Tags visibility::Visibility "data" user::UserType "=" variants::(Variant ("|" Variant)*) ";" -[Rule] Declaration: - tags::Tags "rule" name::Name patternAction::PatternWithAction ";" -[Function] Declaration: - functionDeclaration::FunctionDeclaration -[Test] Declaration: - test::Test ";" -[NamedType] Alternative: - name::Name type::Type -[Function] Kind: - "function" -[Variable] Kind: - "variable" -[All] Kind: - "all" -[Anno] Kind: - "anno" -[Data] Kind: - "data" -[View] Kind: - "view" -[Rule] Kind: - "rule" -[Alias] Kind: - "alias" -[Module] Kind: - "module" -[Tag] Kind: - "tag" -[NAryConstructor] Variant: - name::Name "(" arguments::((TypeArg ("," TypeArg)*)?) ")" -[Labeled] Test: - tags::Tags "test" expression::Expression ":" labeled::StringLiteral -[Unlabeled] Test: - tags::Tags "test" expression::Expression -[Default] PreModule: - header::Header Marker Rest -Rest: - Word*; -[Expression] Command: - expression::Expression -[Declaration] Command: - declaration::Declaration -[Shell] Command: - ":" command::ShellCommand -[Statement] Command: - statement::Statement -[Import] Command: - imported::Import -[SetOption] ShellCommand: - "set" name::QualifiedName expression::Expression -[Undeclare] ShellCommand: - "undeclare" name::QualifiedName -[Help] ShellCommand: - "help" -[Edit] ShellCommand: - "edit" name::QualifiedName -[Unimport] ShellCommand: - "unimport" name::QualifiedName -[ListDeclarations] ShellCommand: - "declarations" -[Quit] ShellCommand: - "quit" -[History] ShellCommand: - "history" -[Test] ShellCommand: - "test" -[ListModules] ShellCommand: - "modules" diff --git a/tank/metasyntax/rascal.dms b/tank/metasyntax/rascal.dms deleted file mode 100644 index ff48d296..00000000 --- a/tank/metasyntax/rascal.dms +++ /dev/null @@ -1,378 +0,0 @@ -Module = header::Header body::Body ; -Header = tags::Tags 'module' name::QualifiedName params::ModuleParameters imports::(Import*) ; -Header = tags::Tags 'module' name::QualifiedName imports::(Import*) ; -Tags = tags::(Tag*) ; -Tag = '@' name::Name contents::TagString ; -Tag = '@' name::Name ; -Tag = '@' name::Name '=' expression::Expression ; -Expression = '{' statements::(Statement+) '}' ; -Expression = '(' expression::Expression ')' ; -Expression = type::Type parameters::Parameters '{' statements::(Statement+) '}' ; -Expression = '[' first::Expression ',' second::Expression '..' last::Expression ']' ; -Expression = parameters::Parameters '{' statements::(Statement*) '}' ; -Expression = label::Label visit::Visit ; -Expression = '(' init::Expression '|' result::Expression '|' generators::(Expression (',' Expression)*) ')' ; -Expression = basicType::BasicType '(' arguments::((Expression (',' Expression)*)?) ')' ; -Expression = expression::Expression '(' arguments::((Expression (',' Expression)*)?) ')' ; -Expression = literal::Literal ; -Expression = 'any' '(' generators::(Expression (',' Expression)*) ')' ; -Expression = 'all' '(' generators::(Expression (',' Expression)*) ')' ; -Expression = comprehension::Comprehension ; -Expression = '{' elements::((Expression (',' Expression)*)?) '}' ; -Expression = '[' elements::((Expression (',' Expression)*)?) ']' ; -Expression = '#' type::Type ; -Expression = '[' first::Expression '..' last::Expression ']' ; -Expression = '<' elements::(Expression (',' Expression)*) '>' ; -Expression = '(' mappings::((Mapping (',' Mapping)*)?) ')' ; -Expression = 'it' ; -Expression = qualifiedName::QualifiedName ; -Expression = expression::Expression '[' subscripts::(Expression (',' Expression)*) ']' ; -Expression = expression::Expression '.' field::Name ; -Expression = expression::Expression '[' key::Name '=' replacement::Expression ']' ; -Expression = expression::Expression '<' fields::(Field (',' Field)*) '>' ; -Expression = argument::Expression '?' ; -Expression = '!' argument::Expression ; -Expression = '-' argument::Expression ; -Expression = argument::Expression '+' ; -Expression = argument::Expression '*' ; -Expression = expression::Expression '[' '@' name::Name '=' value::Expression ']' ; -Expression = expression::Expression '@' name::Name ; -Expression = lhs::Expression 'o' rhs::Expression ; -Expression = lhs::Expression '*' rhs::Expression ; -Expression = lhs::Expression 'join' rhs::Expression ; -Expression = lhs::Expression '%' rhs::Expression ; -Expression = lhs::Expression '/' rhs::Expression ; -Expression = lhs::Expression '&' rhs::Expression ; -Expression = lhs::Expression '+' rhs::Expression ; -Expression = lhs::Expression '-' rhs::Expression ; -Expression = lhs::Expression 'notin' rhs::Expression ; -Expression = lhs::Expression 'in' rhs::Expression ; -Expression = lhs::Expression '>=' rhs::Expression ; -Expression = lhs::Expression '<=' rhs::Expression ; -Expression = lhs::Expression '<' rhs::Expression ; -Expression = lhs::Expression '>' rhs::Expression ; -Expression = condition::Expression '?' thenExp::Expression ':' elseExp::Expression ; -Expression = lhs::Expression '==' rhs::Expression ; -Expression = lhs::Expression '!=' rhs::Expression ; -Expression = lhs::Expression '?' rhs::Expression ; -Expression = pattern::Pattern '!:=' expression::Expression ; -Expression = pattern::Pattern ':=' expression::Expression ; -Expression = pattern::Pattern '<-' expression::Expression ; -Expression = lhs::Expression '==>' rhs::Expression ; -Expression = lhs::Expression '<==>' rhs::Expression ; -Expression = lhs::Expression '&&' rhs::Expression ; -Expression = lhs::Expression '||' rhs::Expression ; -Statement = 'assert' expression::Expression ';' ; -Statement = 'assert' expression::Expression ':' message::Expression ';' ; -Statement = expression::Expression ';' ; -Statement = label::Label visit::Visit ; -Statement = label::Label 'while' '(' conditions::(Expression (',' Expression)*) ')' body::Statement ; -Statement = label::Label 'do' body::Statement 'while' '(' condition::Expression ')' ';' ; -Statement = label::Label 'for' '(' generators::(Expression (',' Expression)*) ')' body::Statement ; -Statement = label::Label 'if' '(' conditions::(Expression (',' Expression)*) ')' thenStatement::Statement noElseMayFollow::NoElseMayFollow ; -Statement = label::Label 'if' '(' conditions::(Expression (',' Expression)*) ')' thenStatement::Statement 'else' elseStatement::Statement ; -Statement = label::Label 'switch' '(' expression::Expression ')' '{' cases::(Case+) '}' ; -Statement = 'fail' target::Target ';' ; -Statement = 'break' target::Target ';' ; -Statement = 'continue' target::Target ';' ; -Statement = 'solve' '(' variables::(QualifiedName (',' QualifiedName)*) bound::Bound ')' body::Statement ; -Statement = 'try' body::Statement handlers::(Catch+) ; -Statement = 'try' body::Statement handlers::(Catch+) 'finally' finallyBody::Statement ; -Statement = label::Label '{' statements::(Statement+) '}' ; -Statement = ';' ; -Statement = 'global' type::Type names::(QualifiedName (',' QualifiedName)*) ';' ; -Statement = assignable::Assignable operator::Assignment statement::Statement ; -Statement = 'return' statement::Statement ; -Statement = 'throw' statement::Statement ; -Statement = 'insert' dataTarget::DataTarget statement::Statement ; -Statement = 'append' dataTarget::DataTarget statement::Statement ; -Statement = functionDeclaration::FunctionDeclaration ; -Statement = declaration::LocalVariableDeclaration ';' ; -Label = name::Name ':' ; -Label = ; -Visit = strategy::Strategy 'visit' '(' subject::Expression ')' '{' cases::(Case+) '}' ; -Visit = 'visit' '(' subject::Expression ')' '{' cases::(Case+) '}' ; -Strategy = 'top-down-break' ; -Strategy = 'top-down' ; -Strategy = 'bottom-up' ; -Strategy = 'bottom-up-break' ; -Strategy = 'outermost' ; -Strategy = 'innermost' ; -Case = 'case' patternWithAction::PatternWithAction ; -Case = 'default' ':' statement::Statement ; -PatternWithAction = pattern::Pattern '=>' replacement::Replacement ; -PatternWithAction = pattern::Pattern ':' statement::Statement ; -Pattern = '{' elements::((Pattern (',' Pattern)*)?) '}' ; -Pattern = '[' elements::((Pattern (',' Pattern)*)?) ']' ; -Pattern = qualifiedName::QualifiedName ; -Pattern = qualifiedName::QualifiedName '*' ; -Pattern = literal::Literal ; -Pattern = '<' elements::(Pattern (',' Pattern)*) '>' ; -Pattern = type::Type name::Name ; -Pattern = '(' mappings::((Mapping (',' Mapping)*)?) ')' ; -Pattern = basicType::BasicType '(' arguments::((Pattern (',' Pattern)*)?) ')' ; -Pattern = expression::Pattern '(' arguments::((Pattern (',' Pattern)*)?) ')' ; -Pattern = name::Name ':' pattern::Pattern ; -Pattern = '[' type::Type ']' pattern::Pattern ; -Pattern = '/' pattern::Pattern ; -Pattern = '!' pattern::Pattern ; -Pattern = type::Type name::Name ':' pattern::Pattern ; -QualifiedName = names::(Name ('::' Name)*) ; -Literal = integerLiteral::IntegerLiteral ; -Literal = regExpLiteral::RegExpLiteral ; -Literal = realLiteral::RealLiteral ; -Literal = booleanLiteral::BooleanLiteral ; -Literal = stringLiteral::StringLiteral ; -Literal = dateTimeLiteral::DateTimeLiteral ; -Literal = locationLiteral::LocationLiteral ; -IntegerLiteral = decimal::DecimalIntegerLiteral ; -IntegerLiteral = hex::HexIntegerLiteral ; -IntegerLiteral = octal::OctalIntegerLiteral ; -StringLiteral = pre::PreStringChars template::StringTemplate tail::StringTail ; -StringLiteral = pre::PreStringChars expression::Expression tail::StringTail ; -StringLiteral = constant::StringConstant ; -StringTemplate = 'if' '(' conditions::(Expression (',' Expression)*) ')' '{' preStats::(Statement*) body::StringMiddle postStats::(Statement*) '}' ; -StringTemplate = 'if' '(' conditions::(Expression (',' Expression)*) ')' '{' preStatsThen::(Statement*) thenString::StringMiddle postStatsThen::(Statement*) '}' 'else' '{' preStatsElse::(Statement*) elseString::StringMiddle postStatsElse::(Statement*) '}' ; -StringTemplate = 'for' '(' generators::(Expression (',' Expression)*) ')' '{' preStats::(Statement*) body::StringMiddle postStats::(Statement*) '}' ; -StringTemplate = 'do' '{' preStats::(Statement*) body::StringMiddle postStats::(Statement*) '}' 'while' '(' condition::Expression ')' ; -StringTemplate = 'while' '(' condition::Expression ')' '{' preStats::(Statement*) body::StringMiddle postStats::(Statement*) '}' ; -StringMiddle = mid::MidStringChars ; -StringMiddle = mid::MidStringChars template::StringTemplate tail::StringMiddle ; -StringMiddle = mid::MidStringChars expression::Expression tail::StringMiddle ; -StringTail = mid::MidStringChars expression::Expression tail::StringTail ; -StringTail = post::PostStringChars ; -StringTail = mid::MidStringChars template::StringTemplate tail::StringTail ; -DateTimeLiteral = date::JustDate ; -DateTimeLiteral = time::JustTime ; -DateTimeLiteral = dateAndTime::DateAndTime ; -LocationLiteral = protocolPart::ProtocolPart pathPart::PathPart ; -ProtocolPart = protocolChars::ProtocolChars ; -ProtocolPart = pre::PreProtocolChars expression::Expression tail::ProtocolTail ; -ProtocolTail = mid::MidProtocolChars expression::Expression tail::ProtocolTail ; -ProtocolTail = post::PostProtocolChars ; -PathPart = pathChars::PathChars ; -PathPart = pre::PrePathChars expression::Expression tail::PathTail ; -PathTail = mid::MidPathChars expression::Expression tail::PathTail ; -PathTail = post::PostPathChars ; -Type = '(' type::Type ')' ; -Type = user::UserType ; -Type = function::FunctionType ; -Type = structured::StructuredType ; -Type = basic::BasicType ; -Type = selector::DataTypeSelector ; -Type = typeVar::TypeVar ; -Type = symbol::Symbol ; -UserType = name::QualifiedName ; -UserType = name::QualifiedName '[' parameters::(Type (',' Type)*) ']' ; -FunctionType = type::Type '(' arguments::((TypeArg (',' TypeArg)*)?) ')' ; -TypeArg = type::Type ; -TypeArg = type::Type name::Name ; -StructuredType = basicType::BasicType '[' arguments::(TypeArg (',' TypeArg)*) ']' ; -BasicType = 'value' ; -BasicType = 'loc' ; -BasicType = 'node' ; -BasicType = 'num' ; -BasicType = 'type' ; -BasicType = 'bag' ; -BasicType = 'int' ; -BasicType = 'rel' ; -BasicType = 'parameter' ; -BasicType = 'real' ; -BasicType = 'fun' ; -BasicType = 'tuple' ; -BasicType = 'str' ; -BasicType = 'bool' ; -BasicType = 'reified' ; -BasicType = 'void' ; -BasicType = 'non-terminal' ; -BasicType = 'datetime' ; -BasicType = 'set' ; -BasicType = 'map' ; -BasicType = 'constructor' ; -BasicType = 'list' ; -BasicType = 'adt' ; -BasicType = 'lex' ; -DataTypeSelector = sort::QualifiedName '.' production::Name ; -TypeVar = '&' name::Name ; -TypeVar = '&' name::Name '<:' bound::Type ; -Symbol = '{' symbol::Symbol sep::StrCon '}' '+' ; -Symbol = '{' symbol::Symbol sep::StrCon '}' '*' ; -Symbol = '(' head::Symbol tail::(Symbol+) ')' ; -Symbol = '(' ')' ; -Symbol = singelQuotedString::SingleQuotedStrCon ; -Symbol = string::StrCon ; -Symbol = charClass::CharClass ; -Symbol = symbol::Symbol '?' ; -Symbol = symbol::Symbol '+' ; -Symbol = symbol::Symbol '*' ; -Symbol = name::QualifiedName ; -Symbol = lhs::Symbol '|' rhs::Symbol ; -CharClass = '(' charClass::CharClass ')' ; -CharClass = '[' optionalCharRanges::OptCharRanges ']' ; -CharClass = '~' charClass::CharClass ; -CharClass = lhs::CharClass '/' rhs::CharClass ; -CharClass = lhs::CharClass '/\' rhs::CharClass ; -CharClass = lhs::CharClass '\/' rhs::CharClass ; -OptCharRanges = ranges::CharRanges ; -OptCharRanges = ; -CharRanges = lhs::CharRanges rhs::CharRanges ; -CharRanges = range::CharRange ; -CharRanges = '(' ranges::CharRanges ')' ; -CharRange = character::Character ; -CharRange = start::Character '-' end::Character ; -Character = numChar::NumChar ; -Character = '\EOF' ; -Character = shortChar::ShortChar ; -Character = '\BOT' ; -Character = '\TOP' ; -Mapping = from::&T ':' to::&T ; -Replacement = replacementExpression::Expression ; -Replacement = replacementExpression::Expression 'when' conditions::(Expression (',' Expression)*) ; -NoElseMayFollow = ; -Target = ; -Target = name::Name ; -Bound = ';' expression::Expression ; -Bound = ; -Catch = 'catch' ':' body::Statement ; -Catch = 'catch' pattern::Pattern ':' body::Statement ; -Assignable = '(' arg::Assignable ')' ; -Assignable = qualifiedName::QualifiedName ; -Assignable = receiver::Assignable '[' subscript::Expression ']' ; -Assignable = receiver::Assignable '.' field::Name ; -Assignable = receiver::Assignable '?' defaultExpression::Expression ; -Assignable = name::Name '(' arguments::(Assignable (',' Assignable)*) ')' ; -Assignable = '<' elements::(Assignable (',' Assignable)*) '>' ; -Assignable = receiver::Assignable '@' annotation::Name ; -Assignment = '?=' ; -Assignment = '/=' ; -Assignment = '*=' ; -Assignment = '&=' ; -Assignment = '-=' ; -Assignment = '=' ; -Assignment = '+=' ; -DataTarget = ; -DataTarget = label::Name ':' ; -FunctionDeclaration = tags::Tags visibility::Visibility signature::Signature ';' ; -FunctionDeclaration = tags::Tags visibility::Visibility signature::Signature body::FunctionBody ; -Visibility = 'private' ; -Visibility = ; -Visibility = 'public' ; -Signature = type::Type modifiers::FunctionModifiers name::Name parameters::Parameters 'throws' exceptions::(Type (',' Type)*) ; -Signature = type::Type modifiers::FunctionModifiers name::Name parameters::Parameters ; -FunctionModifiers = modifiers::(FunctionModifier*) ; -FunctionModifier = 'java' ; -Parameters = '(' formals::Formals ')' ; -Parameters = '(' formals::Formals '...' ')' ; -Formals = formals::((Formal (',' Formal)*)?) ; -Formal = type::Type name::Name ; -FunctionBody = '{' statements::(Statement*) '}' ; -LocalVariableDeclaration = declarator::Declarator ; -LocalVariableDeclaration = 'dynamic' declarator::Declarator ; -Declarator = type::Type variables::(Variable (',' Variable)*) ; -Variable = name::Name '=' initial::Expression ; -Variable = name::Name ; -Comprehension = '{' results::(Expression (',' Expression)*) '|' generators::(Expression (',' Expression)*) '}' ; -Comprehension = '(' from::Expression ':' to::Expression '|' generators::(Expression (',' Expression)*) ')' ; -Comprehension = '[' results::(Expression (',' Expression)*) '|' generators::(Expression (',' Expression)*) ']' ; -Field = fieldIndex::IntegerLiteral ; -Field = fieldName::Name ; -ModuleParameters = '[' parameters::(TypeVar (',' TypeVar)*) ']' ; -Import = 'extend' module::ImportedModule ';' ; -Import = 'import' module::ImportedModule ';' ; -Import = syntax::SyntaxDefinition ; -ImportedModule = name::QualifiedName ; -ImportedModule = name::QualifiedName actuals::ModuleActuals renamings::Renamings ; -ImportedModule = name::QualifiedName renamings::Renamings ; -ImportedModule = name::QualifiedName actuals::ModuleActuals ; -ModuleActuals = '[' types::(Type (',' Type)*) ']' ; -Renamings = 'renaming' renamings::(Renaming (',' Renaming)*) ; -Renaming = from::Name '=>' to::Name ; -SyntaxDefinition = 'layout' defined::Sym '=' production::Prod ';' ; -SyntaxDefinition = start::Start 'syntax' defined::Sym '=' production::Prod ';' ; -Sym = symbol::Sym '+' ; -Sym = '{' symbol::Sym sep::StringConstant '}' '+' ; -Sym = '@' column::IntegerLiteral ; -Sym = charClass::Class ; -Sym = string::StringConstant ; -Sym = '$' ; -Sym = symbol::Sym label::NonterminalLabel ; -Sym = nonterminal::Nonterminal ; -Sym = '&' nonterminal::Nonterminal ; -Sym = symbol::Sym '*' ; -Sym = pnonterminal::ParameterizedNonterminal '[' parameters::(Sym (',' Sym)*) ']' ; -Sym = symbol::Sym '?' ; -Sym = '{' symbol::Sym sep::StringConstant '}' '*' ; -Sym = cistring::CaseInsensitiveStringConstant ; -Sym = '^' ; -Class = '[' ranges::(Range*) ']' ; -Class = '!' charClass::Class ; -Class = lhs::Class '-' rhs::Class ; -Class = lhs::Class '&&' rhs::Class ; -Class = lhs::Class '||' rhs::Class ; -Class = '(' charclass::Class ')' ; -Range = start::Char '-' end::Char ; -Range = character::Char ; -Prod = ':' referenced::Name ; -Prod = prod::Prod action::LanguageAction ; -Prod = modifiers::(ProdModifier*) name::Name ':' args::(Sym*) ; -Prod = '...' ; -Prod = modifiers::(ProdModifier*) args::(Sym*) ; -Prod = associativity::Assoc '(' group::Prod ')' ; -Prod = lhs::Prod '-' rhs::Prod ; -Prod = lhs::Prod '#' rhs::Prod ; -Prod = lhs::Prod '|' rhs::Prod ; -Prod = lhs::Prod '>' rhs::Prod ; -LanguageAction = '=>' expression::Expression ; -LanguageAction = '{' statements::(Statement*) '}' ; -ProdModifier = associativity::Assoc ; -ProdModifier = 'bracket' ; -ProdModifier = 'lex' ; -Assoc = 'assoc' ; -Assoc = 'left' ; -Assoc = 'non-assoc' ; -Assoc = 'right' ; -Start = ; -Start = 'start' ; -Body = toplevels::(Toplevel*) ; -Toplevel = declaration::Declaration ; -Declaration = tags::Tags visibility::Visibility type::Type variables::(Variable (',' Variable)*) ';' ; -Declaration = tags::Tags visibility::Visibility 'anno' annoType::Type onType::Type '@' name::Name ';' ; -Declaration = tags::Tags visibility::Visibility 'view' view::Name '<:' superType::Name '=' alts::(Alternative ('|' Alternative)*) ';' ; -Declaration = tags::Tags visibility::Visibility 'alias' user::UserType '=' base::Type ';' ; -Declaration = tags::Tags visibility::Visibility 'tag' kind::Kind name::Name 'on' types::(Type (',' Type)*) ';' ; -Declaration = tags::Tags visibility::Visibility 'data' user::UserType ';' ; -Declaration = tags::Tags visibility::Visibility 'data' user::UserType '=' variants::(Variant ('|' Variant)*) ';' ; -Declaration = tags::Tags 'rule' name::Name patternAction::PatternWithAction ';' ; -Declaration = functionDeclaration::FunctionDeclaration ; -Declaration = test::Test ';' ; -Alternative = name::Name type::Type ; -Kind = 'function' ; -Kind = 'variable' ; -Kind = 'all' ; -Kind = 'anno' ; -Kind = 'data' ; -Kind = 'view' ; -Kind = 'rule' ; -Kind = 'alias' ; -Kind = 'module' ; -Kind = 'tag' ; -Variant = name::Name '(' arguments::((TypeArg (',' TypeArg)*)?) ')' ; -Test = tags::Tags 'test' expression::Expression ':' labeled::StringLiteral ; -Test = tags::Tags 'test' expression::Expression ; -PreModule = header::Header Marker Rest ; -Rest = Word*; ; -Command = expression::Expression ; -Command = declaration::Declaration ; -Command = ':' command::ShellCommand ; -Command = statement::Statement ; -Command = imported::Import ; -ShellCommand = 'set' name::QualifiedName expression::Expression ; -ShellCommand = 'undeclare' name::QualifiedName ; -ShellCommand = 'help' ; -ShellCommand = 'edit' name::QualifiedName ; -ShellCommand = 'unimport' name::QualifiedName ; -ShellCommand = 'declarations' ; -ShellCommand = 'quit' ; -ShellCommand = 'history' ; -ShellCommand = 'test' ; -ShellCommand = 'modules' ; diff --git a/tank/metasyntax/rascal.html b/tank/metasyntax/rascal.html deleted file mode 100644 index b6326c02..00000000 --- a/tank/metasyntax/rascal.html +++ /dev/null @@ -1,779 +0,0 @@ - - -Browsable Rascal Grammar

                            Browsable Rascal Grammar

                            CC-BY

                            Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                            Source used for this grammar: - Jurgen Vinju, Arnold Lankamp, Tijs van der Storm, RascalRascal.rsc - (10 August 2010 – 5 April 2011)

                            Summary

                            Syntax

                            [Default] Module:
                            -        header::Header body::Body
                            -
                            [Parameters] Header:
                            -        tags::Tags "module" name::QualifiedName params::ModuleParameters imports::(Import*)
                            -
                            [Default] Header:
                            -        tags::Tags "module" name::QualifiedName imports::(Import*)
                            -
                            [Default] Tags:
                            -        tags::(Tag*)
                            -
                            [Default] Tag:
                            -        "@" name::Name contents::TagString
                            -
                            [Empty] Tag:
                            -        "@" name::Name
                            -
                            [Expression] Tag:
                            -        "@" name::Name "=" expression::Expression
                            -
                            [NonEmptyBlock] Expression:
                            -        "{" statements::(Statement+) "}"
                            -
                            [Bracket] Expression:
                            -        "(" expression::Expression ")"
                            -
                            [Closure] Expression:
                            -        type::Type parameters::Parameters "{" statements::(Statement+) "}"
                            -
                            [StepRange] Expression:
                            -        "[" first::Expression "," second::Expression ".." last::Expression "]"
                            -
                            [VoidClosure] Expression:
                            -        parameters::Parameters "{" statements::(Statement*) "}"
                            -
                            [Visit] Expression:
                            -        label::Label visit::Visit
                            -
                            [Reducer] Expression:
                            -        "(" init::Expression "|" result::Expression "|" generators::(Expression ("," Expression)*) ")"
                            -
                            [ReifiedType] Expression:
                            -        basicType::BasicType "(" arguments::((Expression ("," Expression)*)?) ")"
                            -
                            [CallOrTree] Expression:
                            -        expression::Expression "(" arguments::((Expression ("," Expression)*)?) ")"
                            -
                            [Literal] Expression:
                            -        literal::Literal
                            -
                            [Any] Expression:
                            -        "any" "(" generators::(Expression ("," Expression)*) ")"
                            -
                            [All] Expression:
                            -        "all" "(" generators::(Expression ("," Expression)*) ")"
                            -
                            [Comprehension] Expression:
                            -        comprehension::Comprehension
                            -
                            [Set] Expression:
                            -        "{" elements::((Expression ("," Expression)*)?) "}"
                            -
                            [List] Expression:
                            -        "[" elements::((Expression ("," Expression)*)?) "]"
                            -
                            [ReifyType] Expression:
                            -        "#" type::Type
                            -
                            [Range] Expression:
                            -        "[" first::Expression ".." last::Expression "]"
                            -
                            [Tuple] Expression:
                            -        "<" elements::(Expression ("," Expression)*) ">"
                            -
                            [Map] Expression:
                            -        "(" mappings::((Mapping ("," Mapping)*)?) ")"
                            -
                            [It] Expression:
                            -        "it"
                            -
                            [QualifiedName] Expression:
                            -        qualifiedName::QualifiedName
                            -
                            [Subscript] Expression:
                            -        expression::Expression "[" subscripts::(Expression ("," Expression)*) "]"
                            -
                            [FieldAccess] Expression:
                            -        expression::Expression "." field::Name
                            -
                            [FieldUpdate] Expression:
                            -        expression::Expression "[" key::Name "=" replacement::Expression "]"
                            -
                            [FieldProject] Expression:
                            -        expression::Expression "<" fields::(Field ("," Field)*) ">"
                            -
                            [IsDefined] Expression:
                            -        argument::Expression "?"
                            -
                            [Negation] Expression:
                            -        "!" argument::Expression
                            -
                            [Negative] Expression:
                            -        "-" argument::Expression
                            -
                            [TransitiveClosure] Expression:
                            -        argument::Expression "+"
                            -
                            [TransitiveReflexiveClosure] Expression:
                            -        argument::Expression "*"
                            -
                            [SetAnnotation] Expression:
                            -        expression::Expression "[" "@" name::Name "=" value::Expression "]"
                            -
                            [GetAnnotation] Expression:
                            -        expression::Expression "@" name::Name
                            -
                            [Composition] Expression:
                            -        lhs::Expression "o" rhs::Expression
                            -
                            [Product] Expression:
                            -        lhs::Expression "*" rhs::Expression
                            -
                            [Join] Expression:
                            -        lhs::Expression "join" rhs::Expression
                            -
                            [Modulo] Expression:
                            -        lhs::Expression "%" rhs::Expression
                            -
                            [Division] Expression:
                            -        lhs::Expression "/" rhs::Expression
                            -
                            [Intersection] Expression:
                            -        lhs::Expression "&" rhs::Expression
                            -
                            [Addition] Expression:
                            -        lhs::Expression "+" rhs::Expression
                            -
                            [Subtraction] Expression:
                            -        lhs::Expression "-" rhs::Expression
                            -
                            [NotIn] Expression:
                            -        lhs::Expression "notin" rhs::Expression
                            -
                            [In] Expression:
                            -        lhs::Expression "in" rhs::Expression
                            -
                            [GreaterThanOrEq] Expression:
                            -        lhs::Expression ">=" rhs::Expression
                            -
                            [LessThanOrEq] Expression:
                            -        lhs::Expression "<=" rhs::Expression
                            -
                            [LessThan] Expression:
                            -        lhs::Expression "<" rhs::Expression
                            -
                            [GreaterThan] Expression:
                            -        lhs::Expression ">" rhs::Expression
                            -
                            [IfThenElse] Expression:
                            -        condition::Expression "?" thenExp::Expression ":" elseExp::Expression
                            -
                            [Equals] Expression:
                            -        lhs::Expression "==" rhs::Expression
                            -
                            [NonEquals] Expression:
                            -        lhs::Expression "!=" rhs::Expression
                            -
                            [IfDefinedOtherwise] Expression:
                            -        lhs::Expression "?" rhs::Expression
                            -
                            [NoMatch] Expression:
                            -        pattern::Pattern "!:=" expression::Expression
                            -
                            [Match] Expression:
                            -        pattern::Pattern ":=" expression::Expression
                            -
                            [Enumerator] Expression:
                            -        pattern::Pattern "<-" expression::Expression
                            -
                            [Implication] Expression:
                            -        lhs::Expression "==>" rhs::Expression
                            -
                            [Equivalence] Expression:
                            -        lhs::Expression "<==>" rhs::Expression
                            -
                            [And] Expression:
                            -        lhs::Expression "&&" rhs::Expression
                            -
                            [Or] Expression:
                            -        lhs::Expression "||" rhs::Expression
                            -
                            [Assert] Statement:
                            -        "assert" expression::Expression ";"
                            -
                            [AssertWithMessage] Statement:
                            -        "assert" expression::Expression ":" message::Expression ";"
                            -
                            [Expression] Statement:
                            -        expression::Expression ";"
                            -
                            [Visit] Statement:
                            -        label::Label visit::Visit
                            -
                            [While] Statement:
                            -        label::Label "while" "(" conditions::(Expression ("," Expression)*) ")" body::Statement
                            -
                            [DoWhile] Statement:
                            -        label::Label "do" body::Statement "while" "(" condition::Expression ")" ";"
                            -
                            [For] Statement:
                            -        label::Label "for" "(" generators::(Expression ("," Expression)*) ")" body::Statement
                            -
                            [IfThen] Statement:
                            -        label::Label "if" "(" conditions::(Expression ("," Expression)*) ")" thenStatement::Statement noElseMayFollow::NoElseMayFollow
                            -
                            [IfThenElse] Statement:
                            -        label::Label "if" "(" conditions::(Expression ("," Expression)*) ")" thenStatement::Statement "else" elseStatement::Statement
                            -
                            [Switch] Statement:
                            -        label::Label "switch" "(" expression::Expression ")" "{" cases::(Case+) "}"
                            -
                            [Fail] Statement:
                            -        "fail" target::Target ";"
                            -
                            [Break] Statement:
                            -        "break" target::Target ";"
                            -
                            [Continue] Statement:
                            -        "continue" target::Target ";"
                            -
                            [Solve] Statement:
                            -        "solve" "(" variables::(QualifiedName ("," QualifiedName)*) bound::Bound ")" body::Statement
                            -
                            [Try] Statement:
                            -        "try" body::Statement handlers::(Catch+)
                            -
                            [TryFinally] Statement:
                            -        "try" body::Statement handlers::(Catch+) "finally" finallyBody::Statement
                            -
                            [NonEmptyBlock] Statement:
                            -        label::Label "{" statements::(Statement+) "}"
                            -
                            [EmptyStatement] Statement:
                            -        ";"
                            -
                            [GlobalDirective] Statement:
                            -        "global" type::Type names::(QualifiedName ("," QualifiedName)*) ";"
                            -
                            [Assignment] Statement:
                            -        assignable::Assignable operator::Assignment statement::Statement
                            -
                            [Return] Statement:
                            -        "return" statement::Statement
                            -
                            [Throw] Statement:
                            -        "throw" statement::Statement
                            -
                            [Insert] Statement:
                            -        "insert" dataTarget::DataTarget statement::Statement
                            -
                            [Append] Statement:
                            -        "append" dataTarget::DataTarget statement::Statement
                            -
                            [FunctionDeclaration] Statement:
                            -        functionDeclaration::FunctionDeclaration
                            -
                            [VariableDeclaration] Statement:
                            -        declaration::LocalVariableDeclaration ";"
                            -
                            [Default] Label:
                            -        name::Name ":"
                            -
                            [Empty] Label:
                            -        ε
                            -
                            [GivenStrategy] Visit:
                            -        strategy::Strategy "visit" "(" subject::Expression ")" "{" cases::(Case+) "}"
                            -
                            [DefaultStrategy] Visit:
                            -        "visit" "(" subject::Expression ")" "{" cases::(Case+) "}"
                            -
                            [TopDownBreak] Strategy:
                            -        "top-down-break"
                            -
                            [TopDown] Strategy:
                            -        "top-down"
                            -
                            [BottomUp] Strategy:
                            -        "bottom-up"
                            -
                            [BottomUpBreak] Strategy:
                            -        "bottom-up-break"
                            -
                            [Outermost] Strategy:
                            -        "outermost"
                            -
                            [Innermost] Strategy:
                            -        "innermost"
                            -
                            [PatternWithAction] Case:
                            -        "case" patternWithAction::PatternWithAction
                            -
                            [Default] Case:
                            -        "default" ":" statement::Statement
                            -
                            [Replacing] PatternWithAction:
                            -        pattern::Pattern "=>" replacement::Replacement
                            -
                            [Arbitrary] PatternWithAction:
                            -        pattern::Pattern ":" statement::Statement
                            -
                            [Set] Pattern:
                            -        "{" elements::((Pattern ("," Pattern)*)?) "}"
                            -
                            [List] Pattern:
                            -        "[" elements::((Pattern ("," Pattern)*)?) "]"
                            -
                            [QualifiedName] Pattern:
                            -        qualifiedName::QualifiedName
                            -
                            [MultiVariable] Pattern:
                            -        qualifiedName::QualifiedName "*"
                            -
                            [Literal] Pattern:
                            -        literal::Literal
                            -
                            [Tuple] Pattern:
                            -        "<" elements::(Pattern ("," Pattern)*) ">"
                            -
                            [TypedVariable] Pattern:
                            -        type::Type name::Name
                            -
                            [Map] Pattern:
                            -        "(" mappings::((Mapping ("," Mapping)*)?) ")"
                            -
                            [ReifiedType] Pattern:
                            -        basicType::BasicType "(" arguments::((Pattern ("," Pattern)*)?) ")"
                            -
                            [CallOrTree] Pattern:
                            -        expression::Pattern "(" arguments::((Pattern ("," Pattern)*)?) ")"
                            -
                            [VariableBecomes] Pattern:
                            -        name::Name ":" pattern::Pattern
                            -
                            [Guarded] Pattern:
                            -        "[" type::Type "]" pattern::Pattern
                            -
                            [Descendant] Pattern:
                            -        "/" pattern::Pattern
                            -
                            [Anti] Pattern:
                            -        "!" pattern::Pattern
                            -
                            [TypedVariableBecomes] Pattern:
                            -        type::Type name::Name ":" pattern::Pattern
                            -
                            [Default] QualifiedName:
                            -        names::(Name ("::" Name)*)
                            -
                            [Integer] Literal:
                            -        integerLiteral::IntegerLiteral
                            -
                            [RegExp] Literal:
                            -        regExpLiteral::RegExpLiteral
                            -
                            [Real] Literal:
                            -        realLiteral::RealLiteral
                            -
                            [Boolean] Literal:
                            -        booleanLiteral::BooleanLiteral
                            -
                            [String] Literal:
                            -        stringLiteral::StringLiteral
                            -
                            [DateTime] Literal:
                            -        dateTimeLiteral::DateTimeLiteral
                            -
                            [Location] Literal:
                            -        locationLiteral::LocationLiteral
                            -
                            [DecimalIntegerLiteral] IntegerLiteral:
                            -        decimal::DecimalIntegerLiteral
                            -
                            [HexIntegerLiteral] IntegerLiteral:
                            -        hex::HexIntegerLiteral
                            -
                            [OctalIntegerLiteral] IntegerLiteral:
                            -        octal::OctalIntegerLiteral
                            -
                            [Template] StringLiteral:
                            -        pre::PreStringChars template::StringTemplate tail::StringTail
                            -
                            [Interpolated] StringLiteral:
                            -        pre::PreStringChars expression::Expression tail::StringTail
                            -
                            [NonInterpolated] StringLiteral:
                            -        constant::StringConstant
                            -
                            [IfThen] StringTemplate:
                            -        "if" "(" conditions::(Expression ("," Expression)*) ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}"
                            -
                            [IfThenElse] StringTemplate:
                            -        "if" "(" conditions::(Expression ("," Expression)*) ")" "{" preStatsThen::(Statement*) thenString::StringMiddle postStatsThen::(Statement*) "}" "else" "{" preStatsElse::(Statement*) elseString::StringMiddle postStatsElse::(Statement*) "}"
                            -
                            [For] StringTemplate:
                            -        "for" "(" generators::(Expression ("," Expression)*) ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}"
                            -
                            [DoWhile] StringTemplate:
                            -        "do" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" "while" "(" condition::Expression ")"
                            -
                            [While] StringTemplate:
                            -        "while" "(" condition::Expression ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}"
                            -
                            [Mid] StringMiddle:
                            -        mid::MidStringChars
                            -
                            [Template] StringMiddle:
                            -        mid::MidStringChars template::StringTemplate tail::StringMiddle
                            -
                            [Interpolated] StringMiddle:
                            -        mid::MidStringChars expression::Expression tail::StringMiddle
                            -
                            [MidInterpolated] StringTail:
                            -        mid::MidStringChars expression::Expression tail::StringTail
                            -
                            [Post] StringTail:
                            -        post::PostStringChars
                            -
                            [MidTemplate] StringTail:
                            -        mid::MidStringChars template::StringTemplate tail::StringTail
                            -
                            [DateLiteral] DateTimeLiteral:
                            -        date::JustDate
                            -
                            [TimeLiteral] DateTimeLiteral:
                            -        time::JustTime
                            -
                            [DateAndTimeLiteral] DateTimeLiteral:
                            -        dateAndTime::DateAndTime
                            -
                            [Default] LocationLiteral:
                            -        protocolPart::ProtocolPart pathPart::PathPart
                            -
                            [NonInterpolated] ProtocolPart:
                            -        protocolChars::ProtocolChars
                            -
                            [Interpolated] ProtocolPart:
                            -        pre::PreProtocolChars expression::Expression tail::ProtocolTail
                            -
                            [Mid] ProtocolTail:
                            -        mid::MidProtocolChars expression::Expression tail::ProtocolTail
                            -
                            [Post] ProtocolTail:
                            -        post::PostProtocolChars
                            -
                            [NonInterpolated] PathPart:
                            -        pathChars::PathChars
                            -
                            [Interpolated] PathPart:
                            -        pre::PrePathChars expression::Expression tail::PathTail
                            -
                            [Mid] PathTail:
                            -        mid::MidPathChars expression::Expression tail::PathTail
                            -
                            [Post] PathTail:
                            -        post::PostPathChars
                            -
                            [Bracket] Type:
                            -        "(" type::Type ")"
                            -
                            [User] Type:
                            -        user::UserType
                            -
                            [Function] Type:
                            -        function::FunctionType
                            -
                            [Structured] Type:
                            -        structured::StructuredType
                            -
                            [Basic] Type:
                            -        basic::BasicType
                            -
                            [Selector] Type:
                            -        selector::DataTypeSelector
                            -
                            [Variable] Type:
                            -        typeVar::TypeVar
                            -
                            [Symbol] Type:
                            -        symbol::Symbol
                            -
                            [Name] UserType:
                            -        name::QualifiedName
                            -
                            [Parametric] UserType:
                            -        name::QualifiedName "[" parameters::(Type ("," Type)*) "]"
                            -
                            [TypeArguments] FunctionType:
                            -        type::Type "(" arguments::((TypeArg ("," TypeArg)*)?) ")"
                            -
                            [Default] TypeArg:
                            -        type::Type
                            -
                            [Named] TypeArg:
                            -        type::Type name::Name
                            -
                            [Default] StructuredType:
                            -        basicType::BasicType "[" arguments::(TypeArg ("," TypeArg)*) "]"
                            -
                            [Value] BasicType:
                            -        "value"
                            -
                            [Loc] BasicType:
                            -        "loc"
                            -
                            [Node] BasicType:
                            -        "node"
                            -
                            [Num] BasicType:
                            -        "num"
                            -
                            [ReifiedType] BasicType:
                            -        "type"
                            -
                            [Bag] BasicType:
                            -        "bag"
                            -
                            [Int] BasicType:
                            -        "int"
                            -
                            [Relation] BasicType:
                            -        "rel"
                            -
                            [ReifiedTypeParameter] BasicType:
                            -        "parameter"
                            -
                            [Real] BasicType:
                            -        "real"
                            -
                            [ReifiedFunction] BasicType:
                            -        "fun"
                            -
                            [Tuple] BasicType:
                            -        "tuple"
                            -
                            [String] BasicType:
                            -        "str"
                            -
                            [Bool] BasicType:
                            -        "bool"
                            -
                            [ReifiedReifiedType] BasicType:
                            -        "reified"
                            -
                            [Void] BasicType:
                            -        "void"
                            -
                            [ReifiedNonTerminal] BasicType:
                            -        "non-terminal"
                            -
                            [DateTime] BasicType:
                            -        "datetime"
                            -
                            [Set] BasicType:
                            -        "set"
                            -
                            [Map] BasicType:
                            -        "map"
                            -
                            [ReifiedConstructor] BasicType:
                            -        "constructor"
                            -
                            [List] BasicType:
                            -        "list"
                            -
                            [ReifiedAdt] BasicType:
                            -        "adt"
                            -
                            [Lex] BasicType:
                            -        "lex"
                            -
                            [Selector] DataTypeSelector:
                            -        sort::QualifiedName "." production::Name
                            -
                            [Free] TypeVar:
                            -        "&" name::Name
                            -
                            [Bounded] TypeVar:
                            -        "&" name::Name "<:" bound::Type
                            -
                            [IterSep] Symbol:
                            -        "{" symbol::Symbol sep::StrCon "}" "+"
                            -
                            [IterStarSep] Symbol:
                            -        "{" symbol::Symbol sep::StrCon "}" "*"
                            -
                            [Sequence] Symbol:
                            -        "(" head::Symbol tail::(Symbol+) ")"
                            -
                            [Empty] Symbol:
                            -        "(" ")"
                            -
                            [CaseInsensitiveLiteral] Symbol:
                            -        singelQuotedString::SingleQuotedStrCon
                            -
                            [Literal] Symbol:
                            -        string::StrCon
                            -
                            [CharacterClass] Symbol:
                            -        charClass::CharClass
                            -
                            [Optional] Symbol:
                            -        symbol::Symbol "?"
                            -
                            [Iter] Symbol:
                            -        symbol::Symbol "+"
                            -
                            [IterStar] Symbol:
                            -        symbol::Symbol "*"
                            -
                            [Sort] Symbol:
                            -        name::QualifiedName
                            -
                            [Alternative] Symbol:
                            -        lhs::Symbol "|" rhs::Symbol
                            -
                            [Bracket] CharClass:
                            -        "(" charClass::CharClass ")"
                            -
                            [SimpleCharclass] CharClass:
                            -        "[" optionalCharRanges::OptCharRanges "]"
                            -
                            [Complement] CharClass:
                            -        "~" charClass::CharClass
                            -
                            [Difference] CharClass:
                            -        lhs::CharClass "/" rhs::CharClass
                            -
                            [Intersection] CharClass:
                            -        lhs::CharClass "/\" rhs::CharClass
                            -
                            [Union] CharClass:
                            -        lhs::CharClass "\/" rhs::CharClass
                            -
                            [Present] OptCharRanges:
                            -        ranges::CharRanges
                            -
                            [Absent] OptCharRanges:
                            -        ε
                            -
                            [Concatenate] CharRanges:
                            -        lhs::CharRanges rhs::CharRanges
                            -
                            [Range] CharRanges:
                            -        range::CharRange
                            -
                            [Bracket] CharRanges:
                            -        "(" ranges::CharRanges ")"
                            -
                            [Character] CharRange:
                            -        character::Character
                            -
                            [Range] CharRange:
                            -        start::Character "-" end::Character
                            -
                            [Numeric] Character:
                            -        numChar::NumChar
                            -
                            [EOF] Character:
                            -        "\EOF"
                            -
                            [Short] Character:
                            -        shortChar::ShortChar
                            -
                            [Bottom] Character:
                            -        "\BOT"
                            -
                            [Top] Character:
                            -        "\TOP"
                            -
                            [Default] Mapping:
                            -        from::&T ":" to::&T
                            -
                            [Unconditional] Replacement:
                            -        replacementExpression::Expression
                            -
                            [Conditional] Replacement:
                            -        replacementExpression::Expression "when" conditions::(Expression ("," Expression)*)
                            -
                            [Default] NoElseMayFollow:
                            -        ε
                            -
                            [Empty] Target:
                            -        ε
                            -
                            [Labeled] Target:
                            -        name::Name
                            -
                            [Default] Bound:
                            -        ";" expression::Expression
                            -
                            [Empty] Bound:
                            -        ε
                            -
                            [Default] Catch:
                            -        "catch" ":" body::Statement
                            -
                            [Binding] Catch:
                            -        "catch" pattern::Pattern ":" body::Statement
                            -
                            [Bracket] Assignable:
                            -        "(" arg::Assignable ")"
                            -
                            [Variable] Assignable:
                            -        qualifiedName::QualifiedName
                            -
                            [Subscript] Assignable:
                            -        receiver::Assignable "[" subscript::Expression "]"
                            -
                            [FieldAccess] Assignable:
                            -        receiver::Assignable "." field::Name
                            -
                            [IfDefinedOrDefault] Assignable:
                            -        receiver::Assignable "?" defaultExpression::Expression
                            -
                            [Constructor] Assignable:
                            -        name::Name "(" arguments::(Assignable ("," Assignable)*) ")"
                            -
                            [Tuple] Assignable:
                            -        "<" elements::(Assignable ("," Assignable)*) ">"
                            -
                            [Annotation] Assignable:
                            -        receiver::Assignable "@" annotation::Name
                            -
                            [IfDefined] Assignment:
                            -        "?="
                            -
                            [Division] Assignment:
                            -        "/="
                            -
                            [Product] Assignment:
                            -        "*="
                            -
                            [Intersection] Assignment:
                            -        "&="
                            -
                            [Subtraction] Assignment:
                            -        "-="
                            -
                            [Default] Assignment:
                            -        "="
                            -
                            [Addition] Assignment:
                            -        "+="
                            -
                            [Empty] DataTarget:
                            -        ε
                            -
                            [Labeled] DataTarget:
                            -        label::Name ":"
                            -
                            [Abstract] FunctionDeclaration:
                            -        tags::Tags visibility::Visibility signature::Signature ";"
                            -
                            [Default] FunctionDeclaration:
                            -        tags::Tags visibility::Visibility signature::Signature body::FunctionBody
                            -
                            [Private] Visibility:
                            -        "private"
                            -
                            [Default] Visibility:
                            -        ε
                            -
                            [Public] Visibility:
                            -        "public"
                            -
                            [WithThrows] Signature:
                            -        type::Type modifiers::FunctionModifiers name::Name parameters::Parameters "throws" exceptions::(Type ("," Type)*)
                            -
                            [NoThrows] Signature:
                            -        type::Type modifiers::FunctionModifiers name::Name parameters::Parameters
                            -
                            [List] FunctionModifiers:
                            -        modifiers::(FunctionModifier*)
                            -
                            [Java] FunctionModifier:
                            -        "java"
                            -
                            [Default] Parameters:
                            -        "(" formals::Formals ")"
                            -
                            [VarArgs] Parameters:
                            -        "(" formals::Formals "..." ")"
                            -
                            [Default] Formals:
                            -        formals::((Formal ("," Formal)*)?)
                            -
                            [TypeName] Formal:
                            -        type::Type name::Name
                            -
                            [Default] FunctionBody:
                            -        "{" statements::(Statement*) "}"
                            -
                            [Default] LocalVariableDeclaration:
                            -        declarator::Declarator
                            -
                            [Dynamic] LocalVariableDeclaration:
                            -        "dynamic" declarator::Declarator
                            -
                            [Default] Declarator:
                            -        type::Type variables::(Variable ("," Variable)*)
                            -
                            [Initialized] Variable:
                            -        name::Name "=" initial::Expression
                            -
                            [UnInitialized] Variable:
                            -        name::Name
                            -
                            [Set] Comprehension:
                            -        "{" results::(Expression ("," Expression)*) "|" generators::(Expression ("," Expression)*) "}"
                            -
                            [Map] Comprehension:
                            -        "(" from::Expression ":" to::Expression "|" generators::(Expression ("," Expression)*) ")"
                            -
                            [List] Comprehension:
                            -        "[" results::(Expression ("," Expression)*) "|" generators::(Expression ("," Expression)*) "]"
                            -
                            [Index] Field:
                            -        fieldIndex::IntegerLiteral
                            -
                            [Name] Field:
                            -        fieldName::Name
                            -
                            [Default] ModuleParameters:
                            -        "[" parameters::(TypeVar ("," TypeVar)*) "]"
                            -
                            [Extend] Import:
                            -        "extend" module::ImportedModule ";"
                            -
                            [Default] Import:
                            -        "import" module::ImportedModule ";"
                            -
                            [Syntax] Import:
                            -        syntax::SyntaxDefinition
                            -
                            [Default] ImportedModule:
                            -        name::QualifiedName
                            -
                            [ActualsRenaming] ImportedModule:
                            -        name::QualifiedName actuals::ModuleActuals renamings::Renamings
                            -
                            [Renamings] ImportedModule:
                            -        name::QualifiedName renamings::Renamings
                            -
                            [Actuals] ImportedModule:
                            -        name::QualifiedName actuals::ModuleActuals
                            -
                            [Default] ModuleActuals:
                            -        "[" types::(Type ("," Type)*) "]"
                            -
                            [Default] Renamings:
                            -        "renaming" renamings::(Renaming ("," Renaming)*)
                            -
                            [Default] Renaming:
                            -        from::Name "=>" to::Name
                            -
                            [Layout] SyntaxDefinition:
                            -        "layout" defined::Sym "=" production::Prod ";"
                            -
                            [Language] SyntaxDefinition:
                            -        start::Start "syntax" defined::Sym "=" production::Prod ";"
                            -
                            [Iter] Sym:
                            -        symbol::Sym "+"
                            -
                            [IterSep] Sym:
                            -        "{" symbol::Sym sep::StringConstant "}" "+"
                            -
                            [Column] Sym:
                            -        "@" column::IntegerLiteral
                            -
                            [CharacterClass] Sym:
                            -        charClass::Class
                            -
                            [Literal] Sym:
                            -        string::StringConstant
                            -
                            [EndOfLine] Sym:
                            -        "$"
                            -
                            [Labeled] Sym:
                            -        symbol::Sym label::NonterminalLabel
                            -
                            [Nonterminal] Sym:
                            -        nonterminal::Nonterminal
                            -
                            [Parameter] Sym:
                            -        "&" nonterminal::Nonterminal
                            -
                            [IterStar] Sym:
                            -        symbol::Sym "*"
                            -
                            [Parametrized] Sym:
                            -        pnonterminal::ParameterizedNonterminal "[" parameters::(Sym ("," Sym)*) "]"
                            -
                            [Optional] Sym:
                            -        symbol::Sym "?"
                            -
                            [IterStarSep] Sym:
                            -        "{" symbol::Sym sep::StringConstant "}" "*"
                            -
                            [CaseInsensitiveLiteral] Sym:
                            -        cistring::CaseInsensitiveStringConstant
                            -
                            [StartOfLine] Sym:
                            -        "^"
                            -
                            [SimpleCharclass] Class:
                            -        "[" ranges::(Range*) "]"
                            -
                            [Complement] Class:
                            -        "!" charClass::Class
                            -
                            [Difference] Class:
                            -        lhs::Class "-" rhs::Class
                            -
                            [Intersection] Class:
                            -        lhs::Class "&&" rhs::Class
                            -
                            [Union] Class:
                            -        lhs::Class "||" rhs::Class
                            -
                            [Bracket] Class:
                            -        "(" charclass::Class ")"
                            -
                            [FromTo] Range:
                            -        start::Char "-" end::Char
                            -
                            [Character] Range:
                            -        character::Char
                            -
                            [Reference] Prod:
                            -        ":" referenced::Name
                            -
                            [Action] Prod:
                            -        prod::Prod action::LanguageAction
                            -
                            [Labeled] Prod:
                            -        modifiers::(ProdModifier*) name::Name ":" args::(Sym*)
                            -
                            [Others] Prod:
                            -        "..."
                            -
                            [Unlabeled] Prod:
                            -        modifiers::(ProdModifier*) args::(Sym*)
                            -
                            [AssociativityGroup] Prod:
                            -        associativity::Assoc "(" group::Prod ")"
                            -
                            [Reject] Prod:
                            -        lhs::Prod "-" rhs::Prod
                            -
                            [Follow] Prod:
                            -        lhs::Prod "#" rhs::Prod
                            -
                            [All] Prod:
                            -        lhs::Prod "|" rhs::Prod
                            -
                            [First] Prod:
                            -        lhs::Prod ">" rhs::Prod
                            -
                            [Build] LanguageAction:
                            -        "=>" expression::Expression
                            -
                            [Action] LanguageAction:
                            -        "{" statements::(Statement*) "}"
                            -
                            [Associativity] ProdModifier:
                            -        associativity::Assoc
                            -
                            [Bracket] ProdModifier:
                            -        "bracket"
                            -
                            [Lexical] ProdModifier:
                            -        "lex"
                            -
                            [Associative] Assoc:
                            -        "assoc"
                            -
                            [Left] Assoc:
                            -        "left"
                            -
                            [NonAssociative] Assoc:
                            -        "non-assoc"
                            -
                            [Right] Assoc:
                            -        "right"
                            -
                            [Absent] Start:
                            -        ε
                            -
                            [Present] Start:
                            -        "start"
                            -
                            [Toplevels] Body:
                            -        toplevels::(Toplevel*)
                            -
                            [GivenVisibility] Toplevel:
                            -        declaration::Declaration
                            -
                            [Variable] Declaration:
                            -        tags::Tags visibility::Visibility type::Type variables::(Variable ("," Variable)*) ";"
                            -
                            [Annotation] Declaration:
                            -        tags::Tags visibility::Visibility "anno" annoType::Type onType::Type "@" name::Name ";"
                            -
                            [View] Declaration:
                            -        tags::Tags visibility::Visibility "view" view::Name "<:" superType::Name "=" alts::(Alternative ("|" Alternative)*) ";"
                            -
                            [Alias] Declaration:
                            -        tags::Tags visibility::Visibility "alias" user::UserType "=" base::Type ";"
                            -
                            [Tag] Declaration:
                            -        tags::Tags visibility::Visibility "tag" kind::Kind name::Name "on" types::(Type ("," Type)*) ";"
                            -
                            [DataAbstract] Declaration:
                            -        tags::Tags visibility::Visibility "data" user::UserType ";"
                            -
                            [Data] Declaration:
                            -        tags::Tags visibility::Visibility "data" user::UserType "=" variants::(Variant ("|" Variant)*) ";"
                            -
                            [Rule] Declaration:
                            -        tags::Tags "rule" name::Name patternAction::PatternWithAction ";"
                            -
                            [Function] Declaration:
                            -        functionDeclaration::FunctionDeclaration
                            -
                            [Test] Declaration:
                            -        test::Test ";"
                            -
                            [NamedType] Alternative:
                            -        name::Name type::Type
                            -
                            [Function] Kind:
                            -        "function"
                            -
                            [Variable] Kind:
                            -        "variable"
                            -
                            [All] Kind:
                            -        "all"
                            -
                            [Anno] Kind:
                            -        "anno"
                            -
                            [Data] Kind:
                            -        "data"
                            -
                            [View] Kind:
                            -        "view"
                            -
                            [Rule] Kind:
                            -        "rule"
                            -
                            [Alias] Kind:
                            -        "alias"
                            -
                            [Module] Kind:
                            -        "module"
                            -
                            [Tag] Kind:
                            -        "tag"
                            -
                            [NAryConstructor] Variant:
                            -        name::Name "(" arguments::((TypeArg ("," TypeArg)*)?) ")"
                            -
                            [Labeled] Test:
                            -        tags::Tags "test" expression::Expression ":" labeled::StringLiteral
                            -
                            [Unlabeled] Test:
                            -        tags::Tags "test" expression::Expression
                            -
                            [Default] PreModule:
                            -        header::Header Marker Rest
                            -
                            Rest:
                            -        Word*;
                            -
                            [Expression] Command:
                            -        expression::Expression
                            -
                            [Declaration] Command:
                            -        declaration::Declaration
                            -
                            [Shell] Command:
                            -        ":" command::ShellCommand
                            -
                            [Statement] Command:
                            -        statement::Statement
                            -
                            [Import] Command:
                            -        imported::Import
                            -
                            [SetOption] ShellCommand:
                            -        "set" name::QualifiedName expression::Expression
                            -
                            [Undeclare] ShellCommand:
                            -        "undeclare" name::QualifiedName
                            -
                            [Help] ShellCommand:
                            -        "help"
                            -
                            [Edit] ShellCommand:
                            -        "edit" name::QualifiedName
                            -
                            [Unimport] ShellCommand:
                            -        "unimport" name::QualifiedName
                            -
                            [ListDeclarations] ShellCommand:
                            -        "declarations"
                            -
                            [Quit] ShellCommand:
                            -        "quit"
                            -
                            [History] ShellCommand:
                            -        "history"
                            -
                            [Test] ShellCommand:
                            -        "test"
                            -
                            [ListModules] ShellCommand:
                            -        "modules"
                            -

                            - Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. -
                            diff --git a/tank/metasyntax/rascal.rsc b/tank/metasyntax/rascal.rsc deleted file mode 100644 index fafd5f92..00000000 --- a/tank/metasyntax/rascal.rsc +++ /dev/null @@ -1,582 +0,0 @@ -@contributor{bgf2src automated exporter - SLPS} -module Rascal - -syntax Module - = Default: - Header header Body body - ; -syntax Header - = (Tags tags "module" QualifiedName name ModuleParameters params Import* imports) Parameters - | (Tags tags "module" QualifiedName name Import* imports) Default - ; -syntax Tags - = Default: - Tag* tags - ; -syntax Tag - = ("@" Name name TagString contents) Default - | ("@" Name name) Empty - | ("@" Name name "=" Expression expression) Expression - ; -syntax Expression - = ("{" Statement+ statements "}") NonEmptyBlock - | ("(" Expression expression ")") Bracket - | (Type type Parameters parameters "{" Statement+ statements "}") Closure - | ("[" Expression first "," Expression second ".." Expression last "]") StepRange - | (Parameters parameters "{" Statement* statements "}") VoidClosure - | (Label label Visit visit) Visit - | ("(" Expression init "|" Expression result "|" (Expression ("," Expression)*) generators ")") Reducer - | (BasicType basicType "(" {Expression ","}* arguments ")") ReifiedType - | (Expression expression "(" {Expression ","}* arguments ")") CallOrTree - | Literal literal Literal - | ("any" "(" (Expression ("," Expression)*) generators ")") Any - | ("all" "(" (Expression ("," Expression)*) generators ")") All - | Comprehension comprehension Comprehension - | ("{" {Expression ","}* elements "}") Set - | ("[" {Expression ","}* elements "]") List - | ("#" Type type) ReifyType - | ("[" Expression first ".." Expression last "]") Range - | ("\<" (Expression ("," Expression)*) elements "\>") Tuple - | ("(" {Mapping ","}* mappings ")") Map - | "it" It - | QualifiedName qualifiedName QualifiedName - | (Expression expression "[" (Expression ("," Expression)*) subscripts "]") Subscript - | (Expression expression "." Name field) FieldAccess - | (Expression expression "[" Name key "=" Expression replacement "]") FieldUpdate - | (Expression expression "\<" (Field ("," Field)*) fields "\>") FieldProject - | (Expression argument "?") IsDefined - | ("!" Expression argument) Negation - | ("-" Expression argument) Negative - | (Expression argument "+") TransitiveClosure - | (Expression argument "*") TransitiveReflexiveClosure - | (Expression expression "[" "@" Name name "=" Expression value "]") SetAnnotation - | (Expression expression "@" Name name) GetAnnotation - | (Expression lhs "o" Expression rhs) Composition - | (Expression lhs "*" Expression rhs) Product - | (Expression lhs "join" Expression rhs) Join - | (Expression lhs "%" Expression rhs) Modulo - | (Expression lhs "/" Expression rhs) Division - | (Expression lhs "&" Expression rhs) Intersection - | (Expression lhs "+" Expression rhs) Addition - | (Expression lhs "-" Expression rhs) Subtraction - | (Expression lhs "notin" Expression rhs) NotIn - | (Expression lhs "in" Expression rhs) In - | (Expression lhs "\>=" Expression rhs) GreaterThanOrEq - | (Expression lhs "\<=" Expression rhs) LessThanOrEq - | (Expression lhs "\<" Expression rhs) LessThan - | (Expression lhs "\>" Expression rhs) GreaterThan - | (Expression condition "?" Expression thenExp ":" Expression elseExp) IfThenElse - | (Expression lhs "==" Expression rhs) Equals - | (Expression lhs "!=" Expression rhs) NonEquals - | (Expression lhs "?" Expression rhs) IfDefinedOtherwise - | (Pattern pattern "!:=" Expression expression) NoMatch - | (Pattern pattern ":=" Expression expression) Match - | (Pattern pattern "\<-" Expression expression) Enumerator - | (Expression lhs "==\>" Expression rhs) Implication - | (Expression lhs "\<==\>" Expression rhs) Equivalence - | (Expression lhs "&&" Expression rhs) And - | (Expression lhs "||" Expression rhs) Or - ; -syntax Statement - = ("assert" Expression expression ";") Assert - | ("assert" Expression expression ":" Expression message ";") AssertWithMessage - | (Expression expression ";") Expression - | (Label label Visit visit) Visit - | (Label label "while" "(" (Expression ("," Expression)*) conditions ")" Statement body) While - | (Label label "do" Statement body "while" "(" Expression condition ")" ";") DoWhile - | (Label label "for" "(" (Expression ("," Expression)*) generators ")" Statement body) For - | (Label label "if" "(" (Expression ("," Expression)*) conditions ")" Statement thenStatement NoElseMayFollow noElseMayFollow) IfThen - | (Label label "if" "(" (Expression ("," Expression)*) conditions ")" Statement thenStatement "else" Statement elseStatement) IfThenElse - | (Label label "switch" "(" Expression expression ")" "{" Case+ cases "}") Switch - | ("fail" Target target ";") Fail - | ("break" Target target ";") Break - | ("continue" Target target ";") Continue - | ("solve" "(" (QualifiedName ("," QualifiedName)*) variables Bound bound ")" Statement body) Solve - | ("try" Statement body Catch+ handlers) Try - | ("try" Statement body Catch+ handlers "finally" Statement finallyBody) TryFinally - | (Label label "{" Statement+ statements "}") NonEmptyBlock - | ";" EmptyStatement - | ("global" Type type (QualifiedName ("," QualifiedName)*) names ";") GlobalDirective - | (Assignable assignable Assignment operator Statement statement) Assignment - | ("return" Statement statement) Return - | ("throw" Statement statement) Throw - | ("insert" DataTarget dataTarget Statement statement) Insert - | ("append" DataTarget dataTarget Statement statement) Append - | FunctionDeclaration functionDeclaration FunctionDeclaration - | (LocalVariableDeclaration declaration ";") VariableDeclaration - ; -syntax Label - = (Name name ":") Default - | () Empty - ; -syntax Visit - = (Strategy strategy "visit" "(" Expression subject ")" "{" Case+ cases "}") GivenStrategy - | ("visit" "(" Expression subject ")" "{" Case+ cases "}") DefaultStrategy - ; -syntax Strategy - = "top-down-break" TopDownBreak - | "top-down" TopDown - | "bottom-up" BottomUp - | "bottom-up-break" BottomUpBreak - | "outermost" Outermost - | "innermost" Innermost - ; -syntax Case - = ("case" PatternWithAction patternWithAction) PatternWithAction - | ("default" ":" Statement statement) Default - ; -syntax PatternWithAction - = (Pattern pattern "=\>" Replacement replacement) Replacing - | (Pattern pattern ":" Statement statement) Arbitrary - ; -syntax Pattern - = ("{" {Pattern ","}* elements "}") Set - | ("[" {Pattern ","}* elements "]") List - | QualifiedName qualifiedName QualifiedName - | (QualifiedName qualifiedName "*") MultiVariable - | Literal literal Literal - | ("\<" (Pattern ("," Pattern)*) elements "\>") Tuple - | (Type type Name name) TypedVariable - | ("(" {Mapping ","}* mappings ")") Map - | (BasicType basicType "(" {Pattern ","}* arguments ")") ReifiedType - | (Pattern expression "(" {Pattern ","}* arguments ")") CallOrTree - | (Name name ":" Pattern pattern) VariableBecomes - | ("[" Type type "]" Pattern pattern) Guarded - | ("/" Pattern pattern) Descendant - | ("!" Pattern pattern) Anti - | (Type type Name name ":" Pattern pattern) TypedVariableBecomes - ; -syntax QualifiedName - = Default: - (Name ("::" Name)*) names - ; -syntax Literal - = IntegerLiteral integerLiteral Integer - | RegExpLiteral regExpLiteral RegExp - | RealLiteral realLiteral Real - | BooleanLiteral booleanLiteral Boolean - | StringLiteral stringLiteral String - | DateTimeLiteral dateTimeLiteral DateTime - | LocationLiteral locationLiteral Location - ; -syntax IntegerLiteral - = DecimalIntegerLiteral decimal DecimalIntegerLiteral - | HexIntegerLiteral hex HexIntegerLiteral - | OctalIntegerLiteral octal OctalIntegerLiteral - ; -syntax StringLiteral - = (PreStringChars pre StringTemplate template StringTail tail) Template - | (PreStringChars pre Expression expression StringTail tail) Interpolated - | StringConstant constant NonInterpolated - ; -syntax StringTemplate - = ("if" "(" (Expression ("," Expression)*) conditions ")" "{" Statement* preStats StringMiddle body Statement* postStats "}") IfThen - | ("if" "(" (Expression ("," Expression)*) conditions ")" "{" Statement* preStatsThen StringMiddle thenString Statement* postStatsThen "}" "else" "{" Statement* preStatsElse StringMiddle elseString Statement* postStatsElse "}") IfThenElse - | ("for" "(" (Expression ("," Expression)*) generators ")" "{" Statement* preStats StringMiddle body Statement* postStats "}") For - | ("do" "{" Statement* preStats StringMiddle body Statement* postStats "}" "while" "(" Expression condition ")") DoWhile - | ("while" "(" Expression condition ")" "{" Statement* preStats StringMiddle body Statement* postStats "}") While - ; -syntax StringMiddle - = MidStringChars mid Mid - | (MidStringChars mid StringTemplate template StringMiddle tail) Template - | (MidStringChars mid Expression expression StringMiddle tail) Interpolated - ; -syntax StringTail - = (MidStringChars mid Expression expression StringTail tail) MidInterpolated - | PostStringChars post Post - | (MidStringChars mid StringTemplate template StringTail tail) MidTemplate - ; -syntax DateTimeLiteral - = JustDate date DateLiteral - | JustTime time TimeLiteral - | DateAndTime dateAndTime DateAndTimeLiteral - ; -syntax LocationLiteral - = Default: - ProtocolPart protocolPart PathPart pathPart - ; -syntax ProtocolPart - = ProtocolChars protocolChars NonInterpolated - | (PreProtocolChars pre Expression expression ProtocolTail tail) Interpolated - ; -syntax ProtocolTail - = (MidProtocolChars mid Expression expression ProtocolTail tail) Mid - | PostProtocolChars post Post - ; -syntax PathPart - = PathChars pathChars NonInterpolated - | (PrePathChars pre Expression expression PathTail tail) Interpolated - ; -syntax PathTail - = (MidPathChars mid Expression expression PathTail tail) Mid - | PostPathChars post Post - ; -syntax Type - = ("(" Type type ")") Bracket - | UserType user User - | FunctionType function Function - | StructuredType structured Structured - | BasicType basic Basic - | DataTypeSelector selector Selector - | TypeVar typeVar Variable - | Symbol symbol Symbol - ; -syntax UserType - = QualifiedName name Name - | (QualifiedName name "[" (Type ("," Type)*) parameters "]") Parametric - ; -syntax FunctionType - = TypeArguments: - Type type "(" {TypeArg ","}* arguments ")" - ; -syntax TypeArg - = Type type Default - | (Type type Name name) Named - ; -syntax StructuredType - = Default: - BasicType basicType "[" (TypeArg ("," TypeArg)*) arguments "]" - ; -syntax BasicType - = "value" Value - | "loc" Loc - | "node" Node - | "num" Num - | "type" ReifiedType - | "bag" Bag - | "int" Int - | "rel" Relation - | "parameter" ReifiedTypeParameter - | "real" Real - | "fun" ReifiedFunction - | "tuple" Tuple - | "str" String - | "bool" Bool - | "reified" ReifiedReifiedType - | "void" Void - | "non-terminal" ReifiedNonTerminal - | "datetime" DateTime - | "set" Set - | "map" Map - | "constructor" ReifiedConstructor - | "list" List - | "adt" ReifiedAdt - | "lex" Lex - ; -syntax DataTypeSelector - = Selector: - QualifiedName sort "." Name production - ; -syntax TypeVar - = ("&" Name name) Free - | ("&" Name name "\<:" Type bound) Bounded - ; -syntax Symbol - = ("{" Symbol symbol StrCon sep "}" "+") IterSep - | ("{" Symbol symbol StrCon sep "}" "*") IterStarSep - | ("(" Symbol head Symbol+ tail ")") Sequence - | ("(" ")") Empty - | SingleQuotedStrCon singelQuotedString CaseInsensitiveLiteral - | StrCon string Literal - | CharClass charClass CharacterClass - | (Symbol symbol "?") Optional - | (Symbol symbol "+") Iter - | (Symbol symbol "*") IterStar - | QualifiedName name Sort - | (Symbol lhs "|" Symbol rhs) Alternative - ; -syntax CharClass - = ("(" CharClass charClass ")") Bracket - | ("[" OptCharRanges optionalCharRanges "]") SimpleCharclass - | ("~" CharClass charClass) Complement - | (CharClass lhs "/" CharClass rhs) Difference - | (CharClass lhs "/\\" CharClass rhs) Intersection - | (CharClass lhs "\\/" CharClass rhs) Union - ; -syntax OptCharRanges - = CharRanges ranges Present - | () Absent - ; -syntax CharRanges - = (CharRanges lhs CharRanges rhs) Concatenate - | CharRange range Range - | ("(" CharRanges ranges ")") Bracket - ; -syntax CharRange - = Character character Character - | (Character start "-" Character end) Range - ; -syntax Character - = NumChar numChar Numeric - | "\\EOF" EOF - | ShortChar shortChar Short - | "\\BOT" Bottom - | "\\TOP" Top - ; -syntax Mapping - = Default: - &T from ":" &T to - ; -syntax Replacement - = Expression replacementExpression Unconditional - | (Expression replacementExpression "when" (Expression ("," Expression)*) conditions) Conditional - ; -syntax NoElseMayFollow - = Default: - () - ; -syntax Target - = () Empty - | Name name Labeled - ; -syntax Bound - = (";" Expression expression) Default - | () Empty - ; -syntax Catch - = ("catch" ":" Statement body) Default - | ("catch" Pattern pattern ":" Statement body) Binding - ; -syntax Assignable - = ("(" Assignable arg ")") Bracket - | QualifiedName qualifiedName Variable - | (Assignable receiver "[" Expression subscript "]") Subscript - | (Assignable receiver "." Name field) FieldAccess - | (Assignable receiver "?" Expression defaultExpression) IfDefinedOrDefault - | (Name name "(" (Assignable ("," Assignable)*) arguments ")") Constructor - | ("\<" (Assignable ("," Assignable)*) elements "\>") Tuple - | (Assignable receiver "@" Name annotation) Annotation - ; -syntax Assignment - = "?=" IfDefined - | "/=" Division - | "*=" Product - | "&=" Intersection - | "-=" Subtraction - | "=" Default - | "+=" Addition - ; -syntax DataTarget - = () Empty - | (Name label ":") Labeled - ; -syntax FunctionDeclaration - = (Tags tags Visibility visibility Signature signature ";") Abstract - | (Tags tags Visibility visibility Signature signature FunctionBody body) Default - ; -syntax Visibility - = "private" Private - | () Default - | "public" Public - ; -syntax Signature - = (Type type FunctionModifiers modifiers Name name Parameters parameters "throws" (Type ("," Type)*) exceptions) WithThrows - | (Type type FunctionModifiers modifiers Name name Parameters parameters) NoThrows - ; -syntax FunctionModifiers - = List: - FunctionModifier* modifiers - ; -syntax FunctionModifier - = Java: - "java" - ; -syntax Parameters - = ("(" Formals formals ")") Default - | ("(" Formals formals "..." ")") VarArgs - ; -syntax Formals - = Default: - {Formal ","}* formals - ; -syntax Formal - = TypeName: - Type type Name name - ; -syntax FunctionBody - = Default: - "{" Statement* statements "}" - ; -syntax LocalVariableDeclaration - = Declarator declarator Default - | ("dynamic" Declarator declarator) Dynamic - ; -syntax Declarator - = Default: - Type type (Variable ("," Variable)*) variables - ; -syntax Variable - = (Name name "=" Expression initial) Initialized - | Name name UnInitialized - ; -syntax Comprehension - = ("{" (Expression ("," Expression)*) results "|" (Expression ("," Expression)*) generators "}") Set - | ("(" Expression from ":" Expression to "|" (Expression ("," Expression)*) generators ")") Map - | ("[" (Expression ("," Expression)*) results "|" (Expression ("," Expression)*) generators "]") List - ; -syntax Field - = IntegerLiteral fieldIndex Index - | Name fieldName Name - ; -syntax ModuleParameters - = Default: - "[" (TypeVar ("," TypeVar)*) parameters "]" - ; -syntax Import - = ("extend" ImportedModule module ";") Extend - | ("import" ImportedModule module ";") Default - | SyntaxDefinition syntax Syntax - ; -syntax ImportedModule - = QualifiedName name Default - | (QualifiedName name ModuleActuals actuals Renamings renamings) ActualsRenaming - | (QualifiedName name Renamings renamings) Renamings - | (QualifiedName name ModuleActuals actuals) Actuals - ; -syntax ModuleActuals - = Default: - "[" (Type ("," Type)*) types "]" - ; -syntax Renamings - = Default: - "renaming" (Renaming ("," Renaming)*) renamings - ; -syntax Renaming - = Default: - Name from "=\>" Name to - ; -syntax SyntaxDefinition - = ("layout" Sym defined "=" Prod production ";") Layout - | (Start start "syntax" Sym defined "=" Prod production ";") Language - ; -syntax Sym - = (Sym symbol "+") Iter - | ("{" Sym symbol StringConstant sep "}" "+") IterSep - | ("@" IntegerLiteral column) Column - | Class charClass CharacterClass - | StringConstant string Literal - | "$" EndOfLine - | (Sym symbol NonterminalLabel label) Labeled - | Nonterminal nonterminal Nonterminal - | ("&" Nonterminal nonterminal) Parameter - | (Sym symbol "*") IterStar - | (ParameterizedNonterminal pnonterminal "[" (Sym ("," Sym)*) parameters "]") Parametrized - | (Sym symbol "?") Optional - | ("{" Sym symbol StringConstant sep "}" "*") IterStarSep - | CaseInsensitiveStringConstant cistring CaseInsensitiveLiteral - | "^" StartOfLine - ; -syntax Class - = ("[" Range* ranges "]") SimpleCharclass - | ("!" Class charClass) Complement - | (Class lhs "-" Class rhs) Difference - | (Class lhs "&&" Class rhs) Intersection - | (Class lhs "||" Class rhs) Union - | ("(" Class charclass ")") Bracket - ; -syntax Range - = (Char start "-" Char end) FromTo - | Char character Character - ; -syntax Prod - = (":" Name referenced) Reference - | (Prod prod LanguageAction action) Action - | (ProdModifier* modifiers Name name ":" Sym* args) Labeled - | "..." Others - | (ProdModifier* modifiers Sym* args) Unlabeled - | (Assoc associativity "(" Prod group ")") AssociativityGroup - | (Prod lhs "-" Prod rhs) Reject - | (Prod lhs "#" Prod rhs) Follow - | (Prod lhs "|" Prod rhs) All - | (Prod lhs "\>" Prod rhs) First - ; -syntax LanguageAction - = ("=\>" Expression expression) Build - | ("{" Statement* statements "}") Action - ; -syntax ProdModifier - = Assoc associativity Associativity - | "bracket" Bracket - | "lex" Lexical - ; -syntax Assoc - = "assoc" Associative - | "left" Left - | "non-assoc" NonAssociative - | "right" Right - ; -syntax Start - = () Absent - | "start" Present - ; -syntax Body - = Toplevels: - Toplevel* toplevels - ; -syntax Toplevel - = GivenVisibility: - Declaration declaration - ; -syntax Declaration - = (Tags tags Visibility visibility Type type (Variable ("," Variable)*) variables ";") Variable - | (Tags tags Visibility visibility "anno" Type annoType Type onType "@" Name name ";") Annotation - | (Tags tags Visibility visibility "view" Name view "\<:" Name superType "=" (Alternative ("|" Alternative)*) alts ";") View - | (Tags tags Visibility visibility "alias" UserType user "=" Type base ";") Alias - | (Tags tags Visibility visibility "tag" Kind kind Name name "on" (Type ("," Type)*) types ";") Tag - | (Tags tags Visibility visibility "data" UserType user ";") DataAbstract - | (Tags tags Visibility visibility "data" UserType user "=" (Variant ("|" Variant)*) variants ";") Data - | (Tags tags "rule" Name name PatternWithAction patternAction ";") Rule - | FunctionDeclaration functionDeclaration Function - | (Test test ";") Test - ; -syntax Alternative - = NamedType: - Name name Type type - ; -syntax Kind - = "function" Function - | "variable" Variable - | "all" All - | "anno" Anno - | "data" Data - | "view" View - | "rule" Rule - | "alias" Alias - | "module" Module - | "tag" Tag - ; -syntax Variant - = NAryConstructor: - Name name "(" {TypeArg ","}* arguments ")" - ; -syntax Test - = (Tags tags "test" Expression expression ":" StringLiteral labeled) Labeled - | (Tags tags "test" Expression expression) Unlabeled - ; -syntax PreModule - = Default: - Header header Marker Rest - ; -syntax Rest - = - Word*; - ; -syntax Command - = Expression expression Expression - | Declaration declaration Declaration - | (":" ShellCommand command) Shell - | Statement statement Statement - | Import imported Import - ; -syntax ShellCommand - = ("set" QualifiedName name Expression expression) SetOption - | ("undeclare" QualifiedName name) Undeclare - | "help" Help - | ("edit" QualifiedName name) Edit - | ("unimport" QualifiedName name) Unimport - | "declarations" ListDeclarations - | "quit" Quit - | "history" History - | "test" Test - | "modules" ListModules - ; diff --git a/tank/metasyntax/rascal.sdf b/tank/metasyntax/rascal.sdf deleted file mode 100644 index e8df5b66..00000000 --- a/tank/metasyntax/rascal.sdf +++ /dev/null @@ -1,762 +0,0 @@ -module Main - -exports - context-free start-symbols Module - sorts - Module Header Tags Tag Expression Statement Label Visit Strategy Case PatternWithAction Pattern QualifiedName Literal IntegerLiteral StringLiteral StringTemplate StringMiddle StringTail DateTimeLiteral LocationLiteral ProtocolPart ProtocolTail PathPart PathTail Type UserType FunctionType TypeArg StructuredType BasicType DataTypeSelector TypeVar Symbol CharClass OptCharRanges CharRanges CharRange Character Mapping Replacement NoElseMayFollow Target Bound Catch Assignable Assignment DataTarget FunctionDeclaration Visibility Signature FunctionModifiers FunctionModifier Parameters Formals Formal FunctionBody LocalVariableDeclaration Declarator Variable Comprehension Field ModuleParameters Import ImportedModule ModuleActuals Renamings Renaming SyntaxDefinition Sym Class Range Prod LanguageAction ProdModifier Assoc Start Body Toplevel Declaration Alternative Kind Variant Test PreModule Rest Command ShellCommand - context-free syntax - header::Header body::Body -> Module {cons(Default)} - - tags::Tags "module" name::QualifiedName params::ModuleParameters imports::(Import*) -> Header {cons(Parameters)} - - tags::Tags "module" name::QualifiedName imports::(Import*) -> Header {cons(Default)} - - tags::(Tag*) -> Tags {cons(Default)} - - "@" name::Name contents::TagString -> Tag {cons(Default)} - - "@" name::Name -> Tag {cons(Empty)} - - "@" name::Name "=" expression::Expression -> Tag {cons(Expression)} - - "{" statements::(Statement+) "}" -> Expression {cons(NonEmptyBlock)} - - "(" expression::Expression ")" -> Expression {cons(Bracket)} - - type::Type parameters::Parameters "{" statements::(Statement+) "}" -> Expression {cons(Closure)} - - "[" first::Expression "," second::Expression ".." last::Expression "]" -> Expression {cons(StepRange)} - - parameters::Parameters "{" statements::(Statement*) "}" -> Expression {cons(VoidClosure)} - - label::Label visit::Visit -> Expression {cons(Visit)} - - "(" init::Expression "|" result::Expression "|" generators::(Expression ("," Expression)*) ")" -> Expression {cons(Reducer)} - - basicType::BasicType "(" arguments::((Expression ("," Expression)*)?) ")" -> Expression {cons(ReifiedType)} - - expression::Expression "(" arguments::((Expression ("," Expression)*)?) ")" -> Expression {cons(CallOrTree)} - - literal::Literal -> Expression {cons(Literal)} - - "any" "(" generators::(Expression ("," Expression)*) ")" -> Expression {cons(Any)} - - "all" "(" generators::(Expression ("," Expression)*) ")" -> Expression {cons(All)} - - comprehension::Comprehension -> Expression {cons(Comprehension)} - - "{" elements::((Expression ("," Expression)*)?) "}" -> Expression {cons(Set)} - - "[" elements::((Expression ("," Expression)*)?) "]" -> Expression {cons(List)} - - "#" type::Type -> Expression {cons(ReifyType)} - - "[" first::Expression ".." last::Expression "]" -> Expression {cons(Range)} - - "<" elements::(Expression ("," Expression)*) ">" -> Expression {cons(Tuple)} - - "(" mappings::((Mapping ("," Mapping)*)?) ")" -> Expression {cons(Map)} - - "it" -> Expression {cons(It)} - - qualifiedName::QualifiedName -> Expression {cons(QualifiedName)} - - expression::Expression "[" subscripts::(Expression ("," Expression)*) "]" -> Expression {cons(Subscript)} - - expression::Expression "." field::Name -> Expression {cons(FieldAccess)} - - expression::Expression "[" key::Name "=" replacement::Expression "]" -> Expression {cons(FieldUpdate)} - - expression::Expression "<" fields::(Field ("," Field)*) ">" -> Expression {cons(FieldProject)} - - argument::Expression "?" -> Expression {cons(IsDefined)} - - "!" argument::Expression -> Expression {cons(Negation)} - - "-" argument::Expression -> Expression {cons(Negative)} - - argument::Expression "+" -> Expression {cons(TransitiveClosure)} - - argument::Expression "*" -> Expression {cons(TransitiveReflexiveClosure)} - - expression::Expression "[" "@" name::Name "=" value::Expression "]" -> Expression {cons(SetAnnotation)} - - expression::Expression "@" name::Name -> Expression {cons(GetAnnotation)} - - lhs::Expression "o" rhs::Expression -> Expression {cons(Composition)} - - lhs::Expression "*" rhs::Expression -> Expression {cons(Product)} - - lhs::Expression "join" rhs::Expression -> Expression {cons(Join)} - - lhs::Expression "%" rhs::Expression -> Expression {cons(Modulo)} - - lhs::Expression "/" rhs::Expression -> Expression {cons(Division)} - - lhs::Expression "&" rhs::Expression -> Expression {cons(Intersection)} - - lhs::Expression "+" rhs::Expression -> Expression {cons(Addition)} - - lhs::Expression "-" rhs::Expression -> Expression {cons(Subtraction)} - - lhs::Expression "notin" rhs::Expression -> Expression {cons(NotIn)} - - lhs::Expression "in" rhs::Expression -> Expression {cons(In)} - - lhs::Expression ">=" rhs::Expression -> Expression {cons(GreaterThanOrEq)} - - lhs::Expression "<=" rhs::Expression -> Expression {cons(LessThanOrEq)} - - lhs::Expression "<" rhs::Expression -> Expression {cons(LessThan)} - - lhs::Expression ">" rhs::Expression -> Expression {cons(GreaterThan)} - - condition::Expression "?" thenExp::Expression ":" elseExp::Expression -> Expression {cons(IfThenElse)} - - lhs::Expression "==" rhs::Expression -> Expression {cons(Equals)} - - lhs::Expression "!=" rhs::Expression -> Expression {cons(NonEquals)} - - lhs::Expression "?" rhs::Expression -> Expression {cons(IfDefinedOtherwise)} - - pattern::Pattern "!:=" expression::Expression -> Expression {cons(NoMatch)} - - pattern::Pattern ":=" expression::Expression -> Expression {cons(Match)} - - pattern::Pattern "<-" expression::Expression -> Expression {cons(Enumerator)} - - lhs::Expression "==>" rhs::Expression -> Expression {cons(Implication)} - - lhs::Expression "<==>" rhs::Expression -> Expression {cons(Equivalence)} - - lhs::Expression "&&" rhs::Expression -> Expression {cons(And)} - - lhs::Expression "||" rhs::Expression -> Expression {cons(Or)} - - "assert" expression::Expression ";" -> Statement {cons(Assert)} - - "assert" expression::Expression ":" message::Expression ";" -> Statement {cons(AssertWithMessage)} - - expression::Expression ";" -> Statement {cons(Expression)} - - label::Label visit::Visit -> Statement {cons(Visit)} - - label::Label "while" "(" conditions::(Expression ("," Expression)*) ")" body::Statement -> Statement {cons(While)} - - label::Label "do" body::Statement "while" "(" condition::Expression ")" ";" -> Statement {cons(DoWhile)} - - label::Label "for" "(" generators::(Expression ("," Expression)*) ")" body::Statement -> Statement {cons(For)} - - label::Label "if" "(" conditions::(Expression ("," Expression)*) ")" thenStatement::Statement noElseMayFollow::NoElseMayFollow -> Statement {cons(IfThen)} - - label::Label "if" "(" conditions::(Expression ("," Expression)*) ")" thenStatement::Statement "else" elseStatement::Statement -> Statement {cons(IfThenElse)} - - label::Label "switch" "(" expression::Expression ")" "{" cases::(Case+) "}" -> Statement {cons(Switch)} - - "fail" target::Target ";" -> Statement {cons(Fail)} - - "break" target::Target ";" -> Statement {cons(Break)} - - "continue" target::Target ";" -> Statement {cons(Continue)} - - "solve" "(" variables::(QualifiedName ("," QualifiedName)*) bound::Bound ")" body::Statement -> Statement {cons(Solve)} - - "try" body::Statement handlers::(Catch+) -> Statement {cons(Try)} - - "try" body::Statement handlers::(Catch+) "finally" finallyBody::Statement -> Statement {cons(TryFinally)} - - label::Label "{" statements::(Statement+) "}" -> Statement {cons(NonEmptyBlock)} - - ";" -> Statement {cons(EmptyStatement)} - - "global" type::Type names::(QualifiedName ("," QualifiedName)*) ";" -> Statement {cons(GlobalDirective)} - - assignable::Assignable operator::Assignment statement::Statement -> Statement {cons(Assignment)} - - "return" statement::Statement -> Statement {cons(Return)} - - "throw" statement::Statement -> Statement {cons(Throw)} - - "insert" dataTarget::DataTarget statement::Statement -> Statement {cons(Insert)} - - "append" dataTarget::DataTarget statement::Statement -> Statement {cons(Append)} - - functionDeclaration::FunctionDeclaration -> Statement {cons(FunctionDeclaration)} - - declaration::LocalVariableDeclaration ";" -> Statement {cons(VariableDeclaration)} - - name::Name ":" -> Label {cons(Default)} - - -> Label {cons(Empty)} - - strategy::Strategy "visit" "(" subject::Expression ")" "{" cases::(Case+) "}" -> Visit {cons(GivenStrategy)} - - "visit" "(" subject::Expression ")" "{" cases::(Case+) "}" -> Visit {cons(DefaultStrategy)} - - "top-down-break" -> Strategy {cons(TopDownBreak)} - - "top-down" -> Strategy {cons(TopDown)} - - "bottom-up" -> Strategy {cons(BottomUp)} - - "bottom-up-break" -> Strategy {cons(BottomUpBreak)} - - "outermost" -> Strategy {cons(Outermost)} - - "innermost" -> Strategy {cons(Innermost)} - - "case" patternWithAction::PatternWithAction -> Case {cons(PatternWithAction)} - - "default" ":" statement::Statement -> Case {cons(Default)} - - pattern::Pattern "=>" replacement::Replacement -> PatternWithAction {cons(Replacing)} - - pattern::Pattern ":" statement::Statement -> PatternWithAction {cons(Arbitrary)} - - "{" elements::((Pattern ("," Pattern)*)?) "}" -> Pattern {cons(Set)} - - "[" elements::((Pattern ("," Pattern)*)?) "]" -> Pattern {cons(List)} - - qualifiedName::QualifiedName -> Pattern {cons(QualifiedName)} - - qualifiedName::QualifiedName "*" -> Pattern {cons(MultiVariable)} - - literal::Literal -> Pattern {cons(Literal)} - - "<" elements::(Pattern ("," Pattern)*) ">" -> Pattern {cons(Tuple)} - - type::Type name::Name -> Pattern {cons(TypedVariable)} - - "(" mappings::((Mapping ("," Mapping)*)?) ")" -> Pattern {cons(Map)} - - basicType::BasicType "(" arguments::((Pattern ("," Pattern)*)?) ")" -> Pattern {cons(ReifiedType)} - - expression::Pattern "(" arguments::((Pattern ("," Pattern)*)?) ")" -> Pattern {cons(CallOrTree)} - - name::Name ":" pattern::Pattern -> Pattern {cons(VariableBecomes)} - - "[" type::Type "]" pattern::Pattern -> Pattern {cons(Guarded)} - - "/" pattern::Pattern -> Pattern {cons(Descendant)} - - "!" pattern::Pattern -> Pattern {cons(Anti)} - - type::Type name::Name ":" pattern::Pattern -> Pattern {cons(TypedVariableBecomes)} - - names::(Name ("::" Name)*) -> QualifiedName {cons(Default)} - - integerLiteral::IntegerLiteral -> Literal {cons(Integer)} - - regExpLiteral::RegExpLiteral -> Literal {cons(RegExp)} - - realLiteral::RealLiteral -> Literal {cons(Real)} - - booleanLiteral::BooleanLiteral -> Literal {cons(Boolean)} - - stringLiteral::StringLiteral -> Literal {cons(String)} - - dateTimeLiteral::DateTimeLiteral -> Literal {cons(DateTime)} - - locationLiteral::LocationLiteral -> Literal {cons(Location)} - - decimal::DecimalIntegerLiteral -> IntegerLiteral {cons(DecimalIntegerLiteral)} - - hex::HexIntegerLiteral -> IntegerLiteral {cons(HexIntegerLiteral)} - - octal::OctalIntegerLiteral -> IntegerLiteral {cons(OctalIntegerLiteral)} - - pre::PreStringChars template::StringTemplate tail::StringTail -> StringLiteral {cons(Template)} - - pre::PreStringChars expression::Expression tail::StringTail -> StringLiteral {cons(Interpolated)} - - constant::StringConstant -> StringLiteral {cons(NonInterpolated)} - - "if" "(" conditions::(Expression ("," Expression)*) ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" -> StringTemplate {cons(IfThen)} - - "if" "(" conditions::(Expression ("," Expression)*) ")" "{" preStatsThen::(Statement*) thenString::StringMiddle postStatsThen::(Statement*) "}" "else" "{" preStatsElse::(Statement*) elseString::StringMiddle postStatsElse::(Statement*) "}" -> StringTemplate {cons(IfThenElse)} - - "for" "(" generators::(Expression ("," Expression)*) ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" -> StringTemplate {cons(For)} - - "do" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" "while" "(" condition::Expression ")" -> StringTemplate {cons(DoWhile)} - - "while" "(" condition::Expression ")" "{" preStats::(Statement*) body::StringMiddle postStats::(Statement*) "}" -> StringTemplate {cons(While)} - - mid::MidStringChars -> StringMiddle {cons(Mid)} - - mid::MidStringChars template::StringTemplate tail::StringMiddle -> StringMiddle {cons(Template)} - - mid::MidStringChars expression::Expression tail::StringMiddle -> StringMiddle {cons(Interpolated)} - - mid::MidStringChars expression::Expression tail::StringTail -> StringTail {cons(MidInterpolated)} - - post::PostStringChars -> StringTail {cons(Post)} - - mid::MidStringChars template::StringTemplate tail::StringTail -> StringTail {cons(MidTemplate)} - - date::JustDate -> DateTimeLiteral {cons(DateLiteral)} - - time::JustTime -> DateTimeLiteral {cons(TimeLiteral)} - - dateAndTime::DateAndTime -> DateTimeLiteral {cons(DateAndTimeLiteral)} - - protocolPart::ProtocolPart pathPart::PathPart -> LocationLiteral {cons(Default)} - - protocolChars::ProtocolChars -> ProtocolPart {cons(NonInterpolated)} - - pre::PreProtocolChars expression::Expression tail::ProtocolTail -> ProtocolPart {cons(Interpolated)} - - mid::MidProtocolChars expression::Expression tail::ProtocolTail -> ProtocolTail {cons(Mid)} - - post::PostProtocolChars -> ProtocolTail {cons(Post)} - - pathChars::PathChars -> PathPart {cons(NonInterpolated)} - - pre::PrePathChars expression::Expression tail::PathTail -> PathPart {cons(Interpolated)} - - mid::MidPathChars expression::Expression tail::PathTail -> PathTail {cons(Mid)} - - post::PostPathChars -> PathTail {cons(Post)} - - "(" type::Type ")" -> Type {cons(Bracket)} - - user::UserType -> Type {cons(User)} - - function::FunctionType -> Type {cons(Function)} - - structured::StructuredType -> Type {cons(Structured)} - - basic::BasicType -> Type {cons(Basic)} - - selector::DataTypeSelector -> Type {cons(Selector)} - - typeVar::TypeVar -> Type {cons(Variable)} - - symbol::Symbol -> Type {cons(Symbol)} - - name::QualifiedName -> UserType {cons(Name)} - - name::QualifiedName "[" parameters::(Type ("," Type)*) "]" -> UserType {cons(Parametric)} - - type::Type "(" arguments::((TypeArg ("," TypeArg)*)?) ")" -> FunctionType {cons(TypeArguments)} - - type::Type -> TypeArg {cons(Default)} - - type::Type name::Name -> TypeArg {cons(Named)} - - basicType::BasicType "[" arguments::(TypeArg ("," TypeArg)*) "]" -> StructuredType {cons(Default)} - - "value" -> BasicType {cons(Value)} - - "loc" -> BasicType {cons(Loc)} - - "node" -> BasicType {cons(Node)} - - "num" -> BasicType {cons(Num)} - - "type" -> BasicType {cons(ReifiedType)} - - "bag" -> BasicType {cons(Bag)} - - "int" -> BasicType {cons(Int)} - - "rel" -> BasicType {cons(Relation)} - - "parameter" -> BasicType {cons(ReifiedTypeParameter)} - - "real" -> BasicType {cons(Real)} - - "fun" -> BasicType {cons(ReifiedFunction)} - - "tuple" -> BasicType {cons(Tuple)} - - "str" -> BasicType {cons(String)} - - "bool" -> BasicType {cons(Bool)} - - "reified" -> BasicType {cons(ReifiedReifiedType)} - - "void" -> BasicType {cons(Void)} - - "non-terminal" -> BasicType {cons(ReifiedNonTerminal)} - - "datetime" -> BasicType {cons(DateTime)} - - "set" -> BasicType {cons(Set)} - - "map" -> BasicType {cons(Map)} - - "constructor" -> BasicType {cons(ReifiedConstructor)} - - "list" -> BasicType {cons(List)} - - "adt" -> BasicType {cons(ReifiedAdt)} - - "lex" -> BasicType {cons(Lex)} - - sort::QualifiedName "." production::Name -> DataTypeSelector {cons(Selector)} - - "&" name::Name -> TypeVar {cons(Free)} - - "&" name::Name "<:" bound::Type -> TypeVar {cons(Bounded)} - - "{" symbol::Symbol sep::StrCon "}" "+" -> Symbol {cons(IterSep)} - - "{" symbol::Symbol sep::StrCon "}" "*" -> Symbol {cons(IterStarSep)} - - "(" head::Symbol tail::(Symbol+) ")" -> Symbol {cons(Sequence)} - - "(" ")" -> Symbol {cons(Empty)} - - singelQuotedString::SingleQuotedStrCon -> Symbol {cons(CaseInsensitiveLiteral)} - - string::StrCon -> Symbol {cons(Literal)} - - charClass::CharClass -> Symbol {cons(CharacterClass)} - - symbol::Symbol "?" -> Symbol {cons(Optional)} - - symbol::Symbol "+" -> Symbol {cons(Iter)} - - symbol::Symbol "*" -> Symbol {cons(IterStar)} - - name::QualifiedName -> Symbol {cons(Sort)} - - lhs::Symbol "|" rhs::Symbol -> Symbol {cons(Alternative)} - - "(" charClass::CharClass ")" -> CharClass {cons(Bracket)} - - "[" optionalCharRanges::OptCharRanges "]" -> CharClass {cons(SimpleCharclass)} - - "~" charClass::CharClass -> CharClass {cons(Complement)} - - lhs::CharClass "/" rhs::CharClass -> CharClass {cons(Difference)} - - lhs::CharClass "/\" rhs::CharClass -> CharClass {cons(Intersection)} - - lhs::CharClass "\/" rhs::CharClass -> CharClass {cons(Union)} - - ranges::CharRanges -> OptCharRanges {cons(Present)} - - -> OptCharRanges {cons(Absent)} - - lhs::CharRanges rhs::CharRanges -> CharRanges {cons(Concatenate)} - - range::CharRange -> CharRanges {cons(Range)} - - "(" ranges::CharRanges ")" -> CharRanges {cons(Bracket)} - - character::Character -> CharRange {cons(Character)} - - start::Character "-" end::Character -> CharRange {cons(Range)} - - numChar::NumChar -> Character {cons(Numeric)} - - "\EOF" -> Character {cons(EOF)} - - shortChar::ShortChar -> Character {cons(Short)} - - "\BOT" -> Character {cons(Bottom)} - - "\TOP" -> Character {cons(Top)} - - from::&T ":" to::&T -> Mapping {cons(Default)} - - replacementExpression::Expression -> Replacement {cons(Unconditional)} - - replacementExpression::Expression "when" conditions::(Expression ("," Expression)*) -> Replacement {cons(Conditional)} - - -> NoElseMayFollow {cons(Default)} - - -> Target {cons(Empty)} - - name::Name -> Target {cons(Labeled)} - - ";" expression::Expression -> Bound {cons(Default)} - - -> Bound {cons(Empty)} - - "catch" ":" body::Statement -> Catch {cons(Default)} - - "catch" pattern::Pattern ":" body::Statement -> Catch {cons(Binding)} - - "(" arg::Assignable ")" -> Assignable {cons(Bracket)} - - qualifiedName::QualifiedName -> Assignable {cons(Variable)} - - receiver::Assignable "[" subscript::Expression "]" -> Assignable {cons(Subscript)} - - receiver::Assignable "." field::Name -> Assignable {cons(FieldAccess)} - - receiver::Assignable "?" defaultExpression::Expression -> Assignable {cons(IfDefinedOrDefault)} - - name::Name "(" arguments::(Assignable ("," Assignable)*) ")" -> Assignable {cons(Constructor)} - - "<" elements::(Assignable ("," Assignable)*) ">" -> Assignable {cons(Tuple)} - - receiver::Assignable "@" annotation::Name -> Assignable {cons(Annotation)} - - "?=" -> Assignment {cons(IfDefined)} - - "/=" -> Assignment {cons(Division)} - - "*=" -> Assignment {cons(Product)} - - "&=" -> Assignment {cons(Intersection)} - - "-=" -> Assignment {cons(Subtraction)} - - "=" -> Assignment {cons(Default)} - - "+=" -> Assignment {cons(Addition)} - - -> DataTarget {cons(Empty)} - - label::Name ":" -> DataTarget {cons(Labeled)} - - tags::Tags visibility::Visibility signature::Signature ";" -> FunctionDeclaration {cons(Abstract)} - - tags::Tags visibility::Visibility signature::Signature body::FunctionBody -> FunctionDeclaration {cons(Default)} - - "private" -> Visibility {cons(Private)} - - -> Visibility {cons(Default)} - - "public" -> Visibility {cons(Public)} - - type::Type modifiers::FunctionModifiers name::Name parameters::Parameters "throws" exceptions::(Type ("," Type)*) -> Signature {cons(WithThrows)} - - type::Type modifiers::FunctionModifiers name::Name parameters::Parameters -> Signature {cons(NoThrows)} - - modifiers::(FunctionModifier*) -> FunctionModifiers {cons(List)} - - "java" -> FunctionModifier {cons(Java)} - - "(" formals::Formals ")" -> Parameters {cons(Default)} - - "(" formals::Formals "..." ")" -> Parameters {cons(VarArgs)} - - formals::((Formal ("," Formal)*)?) -> Formals {cons(Default)} - - type::Type name::Name -> Formal {cons(TypeName)} - - "{" statements::(Statement*) "}" -> FunctionBody {cons(Default)} - - declarator::Declarator -> LocalVariableDeclaration {cons(Default)} - - "dynamic" declarator::Declarator -> LocalVariableDeclaration {cons(Dynamic)} - - type::Type variables::(Variable ("," Variable)*) -> Declarator {cons(Default)} - - name::Name "=" initial::Expression -> Variable {cons(Initialized)} - - name::Name -> Variable {cons(UnInitialized)} - - "{" results::(Expression ("," Expression)*) "|" generators::(Expression ("," Expression)*) "}" -> Comprehension {cons(Set)} - - "(" from::Expression ":" to::Expression "|" generators::(Expression ("," Expression)*) ")" -> Comprehension {cons(Map)} - - "[" results::(Expression ("," Expression)*) "|" generators::(Expression ("," Expression)*) "]" -> Comprehension {cons(List)} - - fieldIndex::IntegerLiteral -> Field {cons(Index)} - - fieldName::Name -> Field {cons(Name)} - - "[" parameters::(TypeVar ("," TypeVar)*) "]" -> ModuleParameters {cons(Default)} - - "extend" module::ImportedModule ";" -> Import {cons(Extend)} - - "import" module::ImportedModule ";" -> Import {cons(Default)} - - syntax::SyntaxDefinition -> Import {cons(Syntax)} - - name::QualifiedName -> ImportedModule {cons(Default)} - - name::QualifiedName actuals::ModuleActuals renamings::Renamings -> ImportedModule {cons(ActualsRenaming)} - - name::QualifiedName renamings::Renamings -> ImportedModule {cons(Renamings)} - - name::QualifiedName actuals::ModuleActuals -> ImportedModule {cons(Actuals)} - - "[" types::(Type ("," Type)*) "]" -> ModuleActuals {cons(Default)} - - "renaming" renamings::(Renaming ("," Renaming)*) -> Renamings {cons(Default)} - - from::Name "=>" to::Name -> Renaming {cons(Default)} - - "layout" defined::Sym "=" production::Prod ";" -> SyntaxDefinition {cons(Layout)} - - start::Start "syntax" defined::Sym "=" production::Prod ";" -> SyntaxDefinition {cons(Language)} - - symbol::Sym "+" -> Sym {cons(Iter)} - - "{" symbol::Sym sep::StringConstant "}" "+" -> Sym {cons(IterSep)} - - "@" column::IntegerLiteral -> Sym {cons(Column)} - - charClass::Class -> Sym {cons(CharacterClass)} - - string::StringConstant -> Sym {cons(Literal)} - - "$" -> Sym {cons(EndOfLine)} - - symbol::Sym label::NonterminalLabel -> Sym {cons(Labeled)} - - nonterminal::Nonterminal -> Sym {cons(Nonterminal)} - - "&" nonterminal::Nonterminal -> Sym {cons(Parameter)} - - symbol::Sym "*" -> Sym {cons(IterStar)} - - pnonterminal::ParameterizedNonterminal "[" parameters::(Sym ("," Sym)*) "]" -> Sym {cons(Parametrized)} - - symbol::Sym "?" -> Sym {cons(Optional)} - - "{" symbol::Sym sep::StringConstant "}" "*" -> Sym {cons(IterStarSep)} - - cistring::CaseInsensitiveStringConstant -> Sym {cons(CaseInsensitiveLiteral)} - - "^" -> Sym {cons(StartOfLine)} - - "[" ranges::(Range*) "]" -> Class {cons(SimpleCharclass)} - - "!" charClass::Class -> Class {cons(Complement)} - - lhs::Class "-" rhs::Class -> Class {cons(Difference)} - - lhs::Class "&&" rhs::Class -> Class {cons(Intersection)} - - lhs::Class "||" rhs::Class -> Class {cons(Union)} - - "(" charclass::Class ")" -> Class {cons(Bracket)} - - start::Char "-" end::Char -> Range {cons(FromTo)} - - character::Char -> Range {cons(Character)} - - ":" referenced::Name -> Prod {cons(Reference)} - - prod::Prod action::LanguageAction -> Prod {cons(Action)} - - modifiers::(ProdModifier*) name::Name ":" args::(Sym*) -> Prod {cons(Labeled)} - - "..." -> Prod {cons(Others)} - - modifiers::(ProdModifier*) args::(Sym*) -> Prod {cons(Unlabeled)} - - associativity::Assoc "(" group::Prod ")" -> Prod {cons(AssociativityGroup)} - - lhs::Prod "-" rhs::Prod -> Prod {cons(Reject)} - - lhs::Prod "#" rhs::Prod -> Prod {cons(Follow)} - - lhs::Prod "|" rhs::Prod -> Prod {cons(All)} - - lhs::Prod ">" rhs::Prod -> Prod {cons(First)} - - "=>" expression::Expression -> LanguageAction {cons(Build)} - - "{" statements::(Statement*) "}" -> LanguageAction {cons(Action)} - - associativity::Assoc -> ProdModifier {cons(Associativity)} - - "bracket" -> ProdModifier {cons(Bracket)} - - "lex" -> ProdModifier {cons(Lexical)} - - "assoc" -> Assoc {cons(Associative)} - - "left" -> Assoc {cons(Left)} - - "non-assoc" -> Assoc {cons(NonAssociative)} - - "right" -> Assoc {cons(Right)} - - -> Start {cons(Absent)} - - "start" -> Start {cons(Present)} - - toplevels::(Toplevel*) -> Body {cons(Toplevels)} - - declaration::Declaration -> Toplevel {cons(GivenVisibility)} - - tags::Tags visibility::Visibility type::Type variables::(Variable ("," Variable)*) ";" -> Declaration {cons(Variable)} - - tags::Tags visibility::Visibility "anno" annoType::Type onType::Type "@" name::Name ";" -> Declaration {cons(Annotation)} - - tags::Tags visibility::Visibility "view" view::Name "<:" superType::Name "=" alts::(Alternative ("|" Alternative)*) ";" -> Declaration {cons(View)} - - tags::Tags visibility::Visibility "alias" user::UserType "=" base::Type ";" -> Declaration {cons(Alias)} - - tags::Tags visibility::Visibility "tag" kind::Kind name::Name "on" types::(Type ("," Type)*) ";" -> Declaration {cons(Tag)} - - tags::Tags visibility::Visibility "data" user::UserType ";" -> Declaration {cons(DataAbstract)} - - tags::Tags visibility::Visibility "data" user::UserType "=" variants::(Variant ("|" Variant)*) ";" -> Declaration {cons(Data)} - - tags::Tags "rule" name::Name patternAction::PatternWithAction ";" -> Declaration {cons(Rule)} - - functionDeclaration::FunctionDeclaration -> Declaration {cons(Function)} - - test::Test ";" -> Declaration {cons(Test)} - - name::Name type::Type -> Alternative {cons(NamedType)} - - "function" -> Kind {cons(Function)} - - "variable" -> Kind {cons(Variable)} - - "all" -> Kind {cons(All)} - - "anno" -> Kind {cons(Anno)} - - "data" -> Kind {cons(Data)} - - "view" -> Kind {cons(View)} - - "rule" -> Kind {cons(Rule)} - - "alias" -> Kind {cons(Alias)} - - "module" -> Kind {cons(Module)} - - "tag" -> Kind {cons(Tag)} - - name::Name "(" arguments::((TypeArg ("," TypeArg)*)?) ")" -> Variant {cons(NAryConstructor)} - - tags::Tags "test" expression::Expression ":" labeled::StringLiteral -> Test {cons(Labeled)} - - tags::Tags "test" expression::Expression -> Test {cons(Unlabeled)} - - header::Header Marker Rest -> PreModule {cons(Default)} - - Word*; -> Rest - - expression::Expression -> Command {cons(Expression)} - - declaration::Declaration -> Command {cons(Declaration)} - - ":" command::ShellCommand -> Command {cons(Shell)} - - statement::Statement -> Command {cons(Statement)} - - imported::Import -> Command {cons(Import)} - - "set" name::QualifiedName expression::Expression -> ShellCommand {cons(SetOption)} - - "undeclare" name::QualifiedName -> ShellCommand {cons(Undeclare)} - - "help" -> ShellCommand {cons(Help)} - - "edit" name::QualifiedName -> ShellCommand {cons(Edit)} - - "unimport" name::QualifiedName -> ShellCommand {cons(Unimport)} - - "declarations" -> ShellCommand {cons(ListDeclarations)} - - "quit" -> ShellCommand {cons(Quit)} - - "history" -> ShellCommand {cons(History)} - - "test" -> ShellCommand {cons(Test)} - - "modules" -> ShellCommand {cons(ListModules)} diff --git a/tank/metasyntax/txl.html b/tank/metasyntax/txl.html index bedea963..9a6434a5 100644 --- a/tank/metasyntax/txl.html +++ b/tank/metasyntax/txl.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                            Browsable TXL Grammar

                            CC-BY

                            Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                            Source used for this grammar: James R. Cordy, Validated TXL Basis Grammar for TXL 10.5 (February 2009) Version 1.0

                            Summary

                            • Number of production rules: 58
                            • Number of top alternatives: 119
                            • Number of defined nonterminal symbols: 58
                            • Root nonterminal symbols: —
                            • Other top nonterminal symbols: 2: program, typeidOrQuotedLiteral
                            • Bottom nonterminal symbols: 14: comment, NL, stringlit, IN, EX, SP, key, TAB_24, TAB_16, TAB, lengthrule, token, id, special
                            • Number of used terminal symbols: 51
                            • Special terminal symbols: 17: "|", "...", "+", "[", "]", "!", ":", "~", ">", "<", "*", "?", ",", ",+", "$", "'", "#"
                            • Keywords: 34: "include", "keys", "end", "compounds", "comments", "tokens", "define", "redefine", "NL", "IN", "EX", "opt", "repeat", "list", "attr", "see", "not", "push", "pop", "rule", "replace", "by", "match", "function", "external", "construct", "deconstruct", "where", "all", "assert", "import", "export", "skipping", "each"

                            Syntax

                            program:
                            +		        

                            Browsable TXL Grammar

                            CC-BY

                            Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                            Source used for this grammar: James R. Cordy, Validated TXL Basis Grammar for TXL 10.5 (February 2009) Version 1.0

                            Summary

                            • Number of production rules: 58
                            • Number of top alternatives: 119
                            • Number of defined nonterminal symbols: 58
                            • Root nonterminal symbols: —
                            • Other top nonterminal symbols: 2: program, typeidOrQuotedLiteral
                            • Bottom nonterminal symbols: 14: comment, NL, stringlit, IN, EX, SP, key, TAB_24, TAB_16, TAB, lengthrule, token, id, special
                            • Number of used terminal symbols: 51
                            • Special terminal symbols: 17: "|", "...", "+", "[", "]", "!", ":", "~", ">", "<", "*", "?", ",", ",+", "$", "'", "#"
                            • Keywords: 34: "include", "keys", "end", "compounds", "comments", "tokens", "define", "redefine", "NL", "IN", "EX", "opt", "repeat", "list", "attr", "see", "not", "push", "pop", "rule", "replace", "by", "match", "function", "external", "construct", "deconstruct", "where", "all", "assert", "import", "export", "skipping", "each"

                            Syntax

                            program:
                                     statement*
                             
                            statement:
                                     includeStatement
                            @@ -194,5 +204,5 @@
                                     key
                             

                            Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                            diff --git a/tank/metasyntax/yacc-refactor.html b/tank/metasyntax/yacc-refactor.html index 83ec5cc6..f40ad39a 100644 --- a/tank/metasyntax/yacc-refactor.html +++ b/tank/metasyntax/yacc-refactor.html @@ -7,9 +7,19 @@ .t { color: red; font-family: monospace; } .meta, .cmd { color: green; font-style:italic; font-family: serif; } .b { text-align: right; font-style:italic;} -

                            refactor

                            Source: SLPS/topics/grammars/metasyntax/yacc/refactor.xbgf

                            • horizontal (Yacc-declaration); +

                              refactor

                              Source: SLPS/topics/grammars/metasyntax/yacc/refactor.xbgf


                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/metasyntax/yacc.html b/tank/metasyntax/yacc.html index 377d228a..fb7797aa 100644 --- a/tank/metasyntax/yacc.html +++ b/tank/metasyntax/yacc.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable YACC Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable YACC Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Paul Klint, YACC.sdf (28 March 2007)

                              Summary

                              • Number of production rules: 6
                              • Number of top alternatives: 12
                              • Number of defined nonterminal symbols: 6
                              • Root nonterminal symbols: Grammar
                              • Other top nonterminal symbols: —
                              • Bottom nonterminal symbols: 7: C-declarations, Extra-C-code, Terminal, Literal, String, NonTerminal, C-code
                              • Number of used terminal symbols: 10
                              • Special terminal symbols: 10: "%%", "%token", "%left", "%right", "%nonassoc", "%start", ":", "|", ";", "%prec"

                              Syntax

                              Grammar:
                                       C-declarations Yacc-declarations "%%" Grammar-rules "%%" Extra-C-code
                              @@ -37,5 +47,5 @@
                                       Expression Expression
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00000.html b/tank/tescol/00000.html index 715ca93b..18a68d6c 100644 --- a/tank/tescol/00000.html +++ b/tank/tescol/00000.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 74
                              • Number of top alternatives: 126
                              • Number of defined nonterminal symbols: 74
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 2: program, token
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "/*", "*/", "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", ":", ",", ";", "(", ")", "=", "{", "}", "?", "/", "*", "**", "==", "!=", "<", "<=", ">", ">=", "/\\", "\\/", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "if", "then", "else", "while", "do", "int", "double"

                              Syntax

                              program:
                                       TROLLEY n1::CONSTID CONTAINS d1::(declaration*) CHECKOUT s1::statement DONE SEMI
                              @@ -219,5 +229,5 @@
                                       (" " | "\t" | "\r" | "\n")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00000.rsc b/tank/tescol/00000.rsc index 7281a82a..bb7fef83 100644 --- a/tank/tescol/00000.rsc +++ b/tank/tescol/00000.rsc @@ -64,8 +64,8 @@ syntax Negateexp ; syntax Parexp = Literal - | CONSTID id2 - | ID id1 + | id2: CONSTID + | id1: ID | LPAR Arithexp RPAR ; syntax Statement diff --git a/tank/tescol/00001.html b/tank/tescol/00001.html index 723ddbb0..bb1a1897 100644 --- a/tank/tescol/00001.html +++ b/tank/tescol/00001.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 67
                              • Number of top alternatives: 79
                              • Number of defined nonterminal symbols: 67
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, comment, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "**", ":", "*", "/", ",", ":=", "==", "!=", "<", "<=", ">", ">=", "/\\", "\\/", "/*", "*/", "(", ")", "{", "}", ";", "?", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "skip", "trolley", "checkout", "contains", "proc", "var", "int", "double", "const"

                              Syntax

                              program:
                                       TROLLEY CID CONTAINS (declarations SEMI)* statements DONE SEMI
                              @@ -165,5 +175,5 @@
                                       (" " | "\t" | "\r" | "\n")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00010.html b/tank/tescol/00010.html index 2b65888d..7e7c09a7 100644 --- a/tank/tescol/00010.html +++ b/tank/tescol/00010.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 73
                              • Number of top alternatives: 101
                              • Number of defined nonterminal symbols: 73
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: prog, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 108
                              • Special terminal symbols: 93: "e", "E", "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ";", ":", ",", "?", "(", ")", "{", "}", ".", "*", "/", "**", "/\\", "\\/", ":=", "==", "!=", ">", ">=", "<", "<=", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "\u000C", "/*", "*/"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "if", "then", "else", "while", "do", "const", "var", "proc", "int", "double"

                              Syntax

                              prog:
                                       header decl mainStat
                              @@ -193,5 +203,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00011.html b/tank/tescol/00011.html index 1e5455c7..2d4c8b21 100644 --- a/tank/tescol/00011.html +++ b/tank/tescol/00011.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 63
                              • Number of top alternatives: 84
                              • Number of defined nonterminal symbols: 63
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ";", ":", "{", "}", ":=", "(", ")", ",", "?", "+", "-", "/", "*", "**", "==", "!=", "<", "<=", ">", ">=", "/\\", "\\/", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "/*", "*/", "."
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "while", "do", "var", "proc", "const", "if", "then", "else", "int", "double"

                              Syntax

                              program:
                                       TROLLEY CONSTID CONTAINS declarations CHECKOUT statement? SEMI? DONE SEMI
                              @@ -166,5 +176,5 @@
                                       INT? "." ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")* ("e" INT)?
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00100.html b/tank/tescol/00100.html index 2cf0772a..c4a86efc 100644 --- a/tank/tescol/00100.html +++ b/tank/tescol/00100.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 76
                              • Number of top alternatives: 93
                              • Number of defined nonterminal symbols: 76
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 108
                              • Special terminal symbols: 93: "-", "+", ";", ",", ":", "?", "==", "!=", "<", "<=", ">=", ">", "/\\", "\\/", ":=", "/", "*", "**", "{", "}", "(", ")", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "\f", "/*", "*/"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "trolley", "contains", "skip", "checkout", "int", "double", "const", "var", "proc"

                              Syntax

                              program:
                                       TROLLEY CID CONTAINS declarations CHECKOUT statements DONE SEMI EOF
                              @@ -188,5 +198,5 @@
                                       ε
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00101.html b/tank/tescol/00101.html index 51493c9a..2d56d6cf 100644 --- a/tank/tescol/00101.html +++ b/tank/tescol/00101.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 76
                              • Number of top alternatives: 94
                              • Number of defined nonterminal symbols: 76
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, logical, COMMENT_BLOCK, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ";", ":", ":=", "(", ")", "{", "}", ",", "+", "-", "/", "**", "*", "?", "==", "!=", "<", "<=", ">", ">=", "/\\", "\\/", "/*", "*/", " ", "\t", "\r", "\n", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
                              • Keywords: 15: "trolley", "contains", "checkout", "done", "skip", "if", "then", "else", "while", "do", "int", "double", "const", "var", "proc"

                              Syntax

                              program:
                                       stat
                              @@ -189,5 +199,5 @@
                                       ("a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z") ("a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "_")*
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00110.html b/tank/tescol/00110.html index 5492ac9b..b6f2b38e 100644 --- a/tank/tescol/00110.html +++ b/tank/tescol/00110.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 75
                              • Number of top alternatives: 92
                              • Number of defined nonterminal symbols: 75
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 14: program, EQUAL, EXPR, COND, IFELSE, PARAM, TESCO, VARDECL, CONSTDECL, PROCDECL, BODY, PROCAPP, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 120
                              • Special terminal symbols: 95: ";", ":", ",", ":=", "=", "+", "-", "*", "/", "**", "(", ")", "{", "}", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\f", "\r\n", "\r", "\n", "/*", "*/", ".", "==", "!=", "<", "<=", ">", ">=", "?", "/\\", "\\/"
                              • Keywords: 25: "var", "proc", "const", "done", "skip", "trolley", "checkout", "contains", "if", "then", "else", "while", "do", "expr", "cond", "ifelse", "param", "tesco", "vardecl", "constdecl", "procdecl", "body", "procApp", "int", "double"

                              Syntax

                              program:
                                       TROLLEY CONST_ID CONTAINS declarations* CHECKOUT statement* SEMI DONE SEMI
                              @@ -186,5 +196,5 @@
                                       "\\/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/00110.rsc b/tank/tescol/00110.rsc index 923c6357..cb1495f0 100644 --- a/tank/tescol/00110.rsc +++ b/tank/tescol/00110.rsc @@ -8,7 +8,7 @@ syntax Program syntax Term = LEFT_PAREN Expression RIGHT_PAREN | ProcedureApplication - | VAR_ID v2 + | v2: VAR_ID | CONST_ID | INTEGER | DOUBLE diff --git a/tank/tescol/00111.html b/tank/tescol/00111.html index cd910f9c..45a4ec88 100644 --- a/tank/tescol/00111.html +++ b/tank/tescol/00111.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 71
                              • Number of top alternatives: 84
                              • Number of defined nonterminal symbols: 71
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: prog, NEWLINE, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 108
                              • Special terminal symbols: 93: "\r", "\n", ";", ",", ":", "?", "==", "!=", "<", "<=", ">=", ">", "/\\", "\\/", ":=", "+", "-", "/", "*", "**", "{", "}", "(", ")", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\u000C", "/*", "*/"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "trolley", "contains", "skip", "checkout", "int", "double", "const", "var", "proc"

                              Syntax

                              prog:
                                       TROLLEY CID CONTAINS declaration* CHECKOUT compoundStatement SEMI DONE SEMI
                              @@ -174,5 +184,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01000.html b/tank/tescol/01000.html index c2e33b58..d0165bd9 100644 --- a/tank/tescol/01000.html +++ b/tank/tescol/01000.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 67
                              • Number of top alternatives: 85
                              • Number of defined nonterminal symbols: 67
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, nums, COMMENT, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "/*", "*/", ";", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "+", "-", ".", "(", ")", "{", "}", "**", "*", ":=", "/", "?", ":", ",", "==", "!=", "<=", ">=", "<", ">", "/\\", "\\/"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "int", "double", "const", "proc", "var", "if", "then", "else", "while", "do"

                              Syntax

                              program:
                                       TROLLEY CONSTID CONTAINS declarations CHECKOUT statement SEMI DONE SEMI
                              @@ -171,5 +181,5 @@
                                       "\\/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01001.html b/tank/tescol/01001.html index a29a05eb..d5793e2f 100644 --- a/tank/tescol/01001.html +++ b/tank/tescol/01001.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 77
                              • Number of top alternatives: 95
                              • Number of defined nonterminal symbols: 77
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, WS, COM
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ";", ":", ":=", "(", ")", "{", "}", ",", "?", "+", "-", "*", "/", "**", "==", "!=", "<", "<=", ">", ">=", "/\\", "\\/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "/*", "*/"
                              • Keywords: 15: "trolley", "contains", "checkout", "done", "const", "var", "proc", "skip", "if", "then", "else", "while", "do", "int", "double"

                              Syntax

                              program:
                                       TROLLEY CONST_ID CONTAINS declaration* CHECKOUT statement SEMI DONE SEMI
                              @@ -191,5 +201,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01001.rsc b/tank/tescol/01001.rsc index 8c4cb91f..f4218d2a 100644 --- a/tank/tescol/01001.rsc +++ b/tank/tescol/01001.rsc @@ -110,11 +110,11 @@ syntax Atom ; syntax V_id = - (VAR_ID | CONST_ID) idname + idname: (VAR_ID | CONST_ID) ; syntax P_id = - (VAR_ID | CONST_ID) idname + idname: (VAR_ID | CONST_ID) ; syntax Constant = diff --git a/tank/tescol/01010.html b/tank/tescol/01010.html index 82c2e7b3..afa03769 100644 --- a/tank/tescol/01010.html +++ b/tank/tescol/01010.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 83
                              • Number of top alternatives: 116
                              • Number of defined nonterminal symbols: 83
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 7: program, arithop, positive, logicop, vartype, WS, comments
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ":", ";", "?", ",", ":=", "==", "!=", ">", ">=", "<", "<=", "+", " ", "\t", "\r", "\n", "-", "*", "/", "**", "/\\", "\\/", "(", ")", "{", "}", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ".", "/*", "*/"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "if", "then", "else", "while", "do", "int", "double"

                              Syntax

                              program:
                                       TROLLEY CONSTID CONTAINS declaration* CHECKOUT statement SEMI DONE SEMI EOF
                              @@ -218,5 +228,5 @@
                                       ε
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01011.html b/tank/tescol/01011.html index be3b2931..ecb36d77 100644 --- a/tank/tescol/01011.html +++ b/tank/tescol/01011.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 63
                              • Number of top alternatives: 73
                              • Number of defined nonterminal symbols: 63
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 7: program, SKIP, CONSTANT, VARIABLE, PROCEDURE, COMMENT, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 108
                              • Special terminal symbols: 92: "(", ")", "-", "\?", ";", ":", ":=", "{", "}", "+", ",", "/", "*", "**", "==", "<", ">", "!=", "<=", ">=", "/\\", "\\/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "/*", "*/", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", " ", "\t", "\r", "\n"
                              • Keywords: 16: "const", "var", "proc", "skip", "currentProc", "done", "trolley", "checkout", "contains", "int", "double", "if", "then", "else", "while", "do"

                              Syntax

                              program:
                                       TROLLEY id CONTAINS (constant | variable | proceduredecl)+ CHECKOUT statement+ DONE SEMI EOF
                              @@ -155,5 +165,5 @@
                                       ε
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01100.html b/tank/tescol/01100.html index 7da19f88..4a5924f2 100644 --- a/tank/tescol/01100.html +++ b/tank/tescol/01100.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 70
                              • Number of top alternatives: 92
                              • Number of defined nonterminal symbols: 70
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, COMMENT, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ":=", ":", ";", ",", ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "E", "e", "/*", "*/", "+", "-", "/", "**", "*", "(", ")", "{", "}", "==", "!=", "<=", ">=", "<", ">", "/\\", "\\/", "?", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "if", "then", "else", "while", "do", "int", "double"

                              Syntax

                              program:
                                       TROLLEY constidentifier CONTAINS declaration CHECKOUT statements DONE SEMICOLON
                              @@ -181,5 +191,5 @@
                                       (" " | "\t" | "\r" | "\n")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01101.html b/tank/tescol/01101.html index 35ab6702..917d7e86 100644 --- a/tank/tescol/01101.html +++ b/tank/tescol/01101.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 77
                              • Number of top alternatives: 90
                              • Number of defined nonterminal symbols: 77
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, COMMENT, TROLLY, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 108
                              • Special terminal symbols: 92: ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "e", "E", ",", ";", ":", "+", "-", "/", "*", "**", ":=", "?", "==", "!=", "<", ">", "<=", ">=", "/\\", "\\/", "/*", "*/", "{", "}", "(", ")", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n"
                              • Keywords: 16: "int", "double", "done", "skip", "trolley", "checkout", "contains", "var", "const", "proc", "trolly", "if", "then", "else", "while", "do"

                              Syntax

                              program:
                                       trolley checkout
                              @@ -186,5 +196,5 @@
                                       (" " | "\t" | "\r" | "\n")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01110.html b/tank/tescol/01110.html index 38d42fd8..89333142 100644 --- a/tank/tescol/01110.html +++ b/tank/tescol/01110.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 66
                              • Number of top alternatives: 79
                              • Number of defined nonterminal symbols: 66
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: prog, startStat, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "-", "+", ";", ",", ":", "?", "==", "!=", "<", "<=", ">=", ">", "/\\", "\\/", ":=", "/", "*", "**", "{", "}", "(", ")", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "/*", "*/"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "trolley", "contains", "skip", "checkout", "int", "double", "const", "var", "proc"

                              Syntax

                              prog:
                                       TROLLEY CID CONTAINS declaration* checkoutStat
                              @@ -164,5 +174,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/01111.html b/tank/tescol/01111.html index dc8325a6..3e6198ea 100644 --- a/tank/tescol/01111.html +++ b/tank/tescol/01111.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 70
                              • Number of top alternatives: 87
                              • Number of defined nonterminal symbols: 70
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, comment, UNDER, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 109
                              • Special terminal symbols: 94: "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", ":", ":=", ";", "(", ")", ",", "{", "}", "_", "/", "**", "*", "?", "==", "!=", "<", "<=", ">", ">=", "\\/", "/\\", "/*", "*/", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\t", "|", "\n", "\r", " ", "\f"
                              • Keywords: 15: "done", "do", "trolley", "proc", "contains", "checkout", "skip", "const", "var", "if", "then", "else", "while", "int", "double"

                              Syntax

                              program:
                                       progTree+
                              @@ -176,5 +186,5 @@
                                       ("\t" | "|" | "\n" | "\r" | " " | "\f")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10000.html b/tank/tescol/10000.html index bd2c1f74..186c012a 100644 --- a/tank/tescol/10000.html +++ b/tank/tescol/10000.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 59
                              • Number of top alternatives: 69
                              • Number of defined nonterminal symbols: 59
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: prog, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "\r", "\n", ";", ",", ":", "?", "==", "!=", "<", "<=", ">=", ">", "/\\", "\\/", ":=", "+", "-", "/", "*", "**", "{", "}", "(", ")", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "/*", "*/"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "trolley", "contains", "skip", "checkout", "int", "double", "const", "var", "proc"

                              Syntax

                              prog:
                                       TROLLEY CID CONTAINS NEWLINE* decl* CHECKOUT NEWLINE* stat DONE SEMI
                              @@ -147,5 +157,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10001.html b/tank/tescol/10001.html index a8d247f2..2d573c0a 100644 --- a/tank/tescol/10001.html +++ b/tank/tescol/10001.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 68
                              • Number of top alternatives: 84
                              • Number of defined nonterminal symbols: 68
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 7: prog, ID, ARGLIST, PROCBODY, CALL, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 111
                              • Special terminal symbols: 92: ";", ",", ":", "?", "==", "!=", "<", "<=", ">=", ">", "/\\", "\\/", ":=", "+", "-", "/", "*", "**", "{", "}", "(", ")", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "/*", "*/"
                              • Keywords: 19: "id", "arglist", "procbody", "call", "if", "then", "else", "while", "do", "done", "trolley", "contains", "skip", "checkout", "int", "double", "const", "var", "proc"

                              Syntax

                              prog:
                                       stat+
                              @@ -171,5 +181,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10001.rsc b/tank/tescol/10001.rsc index 951b0ff1..c547b0ae 100644 --- a/tank/tescol/10001.rsc +++ b/tank/tescol/10001.rsc @@ -59,11 +59,11 @@ syntax ID ; syntax Id = - IDENT i + i: IDENT ; syntax Cid = - CIDENT i + i: CIDENT ; syntax Atom = INT_NUMBER diff --git a/tank/tescol/10010.html b/tank/tescol/10010.html index 76aca96c..e8683aaf 100644 --- a/tank/tescol/10010.html +++ b/tank/tescol/10010.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 67
                              • Number of top alternatives: 89
                              • Number of defined nonterminal symbols: 67
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, operator, CMT, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "/*", "*/", "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "(", ")", "{", "}", " ", "\t", "\r", "\n", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", ";", ":", ",", ":=", "?", "/", "*", "**", "==", "!=", ">", "<", ">=", "<=", "/\\", "\\/"
                              • Keywords: 15: "const", "var", "proc", "int", "double", "done", "skip", "trolley", "checkout", "contains", "if", "then", "else", "while", "do"

                              Syntax

                              program:
                                       TROLLEY id CONTAINS declaration+ CHECKOUT statement SEMI DONE SEMI
                              @@ -175,5 +185,5 @@
                                       "\\/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10011.html b/tank/tescol/10011.html index 1572cf8a..ff4057f0 100644 --- a/tank/tescol/10011.html +++ b/tank/tescol/10011.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 68
                              • Number of top alternatives: 86
                              • Number of defined nonterminal symbols: 68
                              • Root nonterminal symbols: program
                              • Other top nonterminal symbols: —
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 101
                              • Special terminal symbols: 86: "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", ":", ":=", "-", "+", ".", "e", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "(", ")", "**", "*", "/", ",", "==", "!=", "<", ">", "<=", ">=", "/\\", "\\/", "?", ";", "{", "}"
                              • Keywords: 15: "trolley", "contains", "const", "int", "double", "var", "proc", "skip", "if", "then", "else", "while", "do", "checkout", "done"

                              Syntax

                              program:
                                       TROLLEY CONSTANT CONTAINS declaration* CHECKOUT statementlist SEMI DONE SEMI
                              @@ -173,5 +183,5 @@
                                       "done"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10100.html b/tank/tescol/10100.html index 266439c1..b04b2ae5 100644 --- a/tank/tescol/10100.html +++ b/tank/tescol/10100.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 61
                              • Number of top alternatives: 73
                              • Number of defined nonterminal symbols: 61
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: prog, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "\r", "\n", ";", ",", ":", "?", "==", "!=", "<", "<=", ">=", ">", "/\\", "\\/", ":=", "+", "-", "/", "*", "**", "{", "}", "(", ")", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "/*", "*/"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "trolley", "contains", "skip", "checkout", "int", "double", "const", "var", "proc"

                              Syntax

                              prog:
                                       NEWLINE* TROLLEY NEWLINE* CID NEWLINE* CONTAINS NEWLINE* declarations NEWLINE* statement NEWLINE* SEMI NEWLINE* DONE NEWLINE* SEMI
                              @@ -153,5 +163,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10101.html b/tank/tescol/10101.html index 25d2016b..5e16b044 100644 --- a/tank/tescol/10101.html +++ b/tank/tescol/10101.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 62
                              • Number of top alternatives: 75
                              • Number of defined nonterminal symbols: 62
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, DECIMAL, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ";", ",", ":=", ".", "{", "}", "(", ")", "+", "-", "/", "*", "**", "?", ":", "==", "!=", ">", ">=", "<", "<=", "/\\", "\\/", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "/*", "*/"
                              • Keywords: 15: "int", "double", "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "if", "then", "else", "while", "do"

                              Syntax

                              program:
                                       TROLLEY CONSTANTID CONTAINS declaration* CHECKOUT mainstatement SEMI DONE SEMI
                              @@ -156,5 +166,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10110.html b/tank/tescol/10110.html index 62d625d1..11ae26f4 100644 --- a/tank/tescol/10110.html +++ b/tank/tescol/10110.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 74
                              • Number of top alternatives: 101
                              • Number of defined nonterminal symbols: 74
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 9: program, whitespace, comment, operator, PROC, KEY_INT, KEY_DOUBLE, VAR, CONST
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 108
                              • Special terminal symbols: 93: "/*", "*/", "+", "-", "*", "/", "=", "/\\", "\\/", "==", "!=", "<", ">", "<=", ">=", "?", "e", "E", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", ";", ",", ":", "{", "}", ":=", ")", "(", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "\f"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "if", "then", "else", "proc", "do", "while", "int", "double", "var", "const"

                              Syntax

                              program:
                                       TROLLEY cidentifier CONTAINS dec* CHECKOUT CURLY_L (statement (SEMI statement)*)? CURLY_R SEMI DONE SEMI EOF
                              @@ -194,5 +204,5 @@
                                       ε
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10111.html b/tank/tescol/10111.html index 482b8df5..33da1cd4 100644 --- a/tank/tescol/10111.html +++ b/tank/tescol/10111.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 71
                              • Number of top alternatives: 87
                              • Number of defined nonterminal symbols: 71
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: prog, COMMENT, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "/*", "*/", " ", "\t", "\r", "\n", ";", ",", ":", "?", ":=", "(", ")", "{", "}", "**", "+", "-", "*", "/", "/\\", "\\/", "==", "!=", "<", ">", "<=", ">=", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
                              • Keywords: 15: "int", "double", "done", "skip", "if", "then", "else", "while", "do", "trolley", "checkout", "contains", "const", "var", "proc"

                              Syntax

                              prog:
                                       KW_TROLLEY ID_GENERAL KW_CONTAINS decl* KW_CHECKOUT statement KW_DONE SYM_SEMI
                              @@ -177,5 +187,5 @@
                                       ("e" | "E") (SYM_ADD | SYM_SUB)? INT
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/10111.rsc b/tank/tescol/10111.rsc index 07f3b676..049b7baf 100644 --- a/tank/tescol/10111.rsc +++ b/tank/tescol/10111.rsc @@ -43,7 +43,7 @@ syntax Molecule ; syntax Atom = Immediate - | Varproc_id v + | v: Varproc_id | Proc_call | Parenthesised ; diff --git a/tank/tescol/11000.html b/tank/tescol/11000.html index a7869bef..08907e02 100644 --- a/tank/tescol/11000.html +++ b/tank/tescol/11000.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 75
                              • Number of top alternatives: 88
                              • Number of defined nonterminal symbols: 75
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "+", "-", "(", ")", ";", "{", "}", "?", ":", ":=", ",", "\\", "*", "**", "\\/", "/\\", "==", "!=", ">", "<", ">=", "<=", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "/*", "*/"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "int", "double", "if", "while", "do", "then", "else"

                              Syntax

                              program:
                                       trolley checkout done
                              @@ -182,5 +192,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/11001.html b/tank/tescol/11001.html index a225b5f6..124766e3 100644 --- a/tank/tescol/11001.html +++ b/tank/tescol/11001.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 76
                              • Number of top alternatives: 93
                              • Number of defined nonterminal symbols: 76
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 104
                              • Special terminal symbols: 89: ";", ":", "=", ",", "+", "-", "*", "**", "/", "(", ")", "?", "!", "<", ">", "{", "}", "/\\", "\\/", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ".", " ", "\t", "\r", "\n", "/*", "*/"
                              • Keywords: 15: "done", "trolley", "checkout", "contains", "proc", "if", "then", "else", "while", "do", "skip", "var", "const", "int", "double"

                              Syntax

                              program:
                                       TROLLEY CONSTID contains checkout done
                              @@ -188,5 +198,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/11001.rsc b/tank/tescol/11001.rsc index 121b6533..20a24aab 100644 --- a/tank/tescol/11001.rsc +++ b/tank/tescol/11001.rsc @@ -58,7 +58,7 @@ syntax Whilestatement ; syntax Expression = - Mixfix e + e: Mixfix ; syntax Mixfix = @@ -89,9 +89,9 @@ syntax Exp_exp Atom_exp l (EXP Atom_exp r)* ; syntax Atom_exp - = Unary_exp e + = e: Unary_exp | LPAREN Expression exp RPAREN - | Proccall proc + | proc: Proccall ; syntax Unary_exp = @@ -106,21 +106,21 @@ syntax Argumentlist | () ; syntax Conditional - = EQUALITY t - | INEQUALITY t - | LANGLE t - | RANGLE t - | LTEQUALS t - | GTEQUALS t + = t: EQUALITY + | t: INEQUALITY + | t: LANGLE + | t: RANGLE + | t: LTEQUALS + | t: GTEQUALS ; syntax Number - = FLOAT f - | INT i - | UINT u + = f: FLOAT + | i: INT + | u: UINT ; syntax Id = - (CONSTID | VARID) name + name: (CONSTID | VARID) ; syntax SEMI = diff --git a/tank/tescol/11010.html b/tank/tescol/11010.html index a31a75a4..01574d12 100644 --- a/tank/tescol/11010.html +++ b/tank/tescol/11010.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 69
                              • Number of top alternatives: 82
                              • Number of defined nonterminal symbols: 69
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, COMMENT, EXPONENT, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ";", ":", ",", "?", ":=", "/*", "*/", "{", "}", "(", ")", "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "**", "*", "/", "==", "!=", "<", "<=", ">", ">=", "/\\", "\\/", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "int", "double", "if", "then", "else", "while", "do"

                              Syntax

                              program:
                                       progTree+
                              @@ -170,5 +180,5 @@
                                       (" " | "\t" | "\r" | "\n")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/11011.html b/tank/tescol/11011.html index c0731f37..0a396835 100644 --- a/tank/tescol/11011.html +++ b/tank/tescol/11011.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 67
                              • Number of top alternatives: 76
                              • Number of defined nonterminal symbols: 67
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ":=", ";", ":", ",", "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "(", ")", "{", "}", "?", "*", "/", "**", "==", "!=", "<", "<=", ">", ">=", "/\\", "\\/", " ", "\t", "\r", "\n", "/*", "*/", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "int", "double"

                              Syntax

                              program:
                                       TROLLEY CONST_ID declarations statements DONE SEMI
                              @@ -162,5 +172,5 @@
                                       ("a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z") ("a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "_")*
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/11100.html b/tank/tescol/11100.html index b25f0e4b..a8e900e9 100644 --- a/tank/tescol/11100.html +++ b/tank/tescol/11100.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 54
                              • Number of top alternatives: 75
                              • Number of defined nonterminal symbols: 54
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 5: program, COMMENT, TRUE, FALSE, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 109
                              • Special terminal symbols: 92: "/*", "*/", "**", "/", "*", "+", "-", "/\\", "\\/", "==", "!=", "<=", ">=", "<", ">", ":=", ":", ";", ",", "?", "(", ")", "{", "}", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ".", " ", "\t", "\r", "\n"
                              • Keywords: 17: "trolley", "contains", "checkout", "done", "const", "var", "proc", "skip", "if", "then", "else", "while", "do", "int", "double", "true", "false"

                              Syntax

                              program:
                                       TROLLEY CONSTID CONTAINS (definition SEMI?)* CHECKOUT statement SEMI? DONE SEMI
                              @@ -148,5 +158,5 @@
                                       (" " | "\t" | "\r" | "\n")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/11101.html b/tank/tescol/11101.html index 82d1b520..60bc2619 100644 --- a/tank/tescol/11101.html +++ b/tank/tescol/11101.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 64
                              • Number of top alternatives: 81
                              • Number of defined nonterminal symbols: 64
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: prog, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ";", ":", ",", ":=", "?", "{", "}", "(", ")", "/\\", "\\/", "+", "-", "/", "*", "**", "==", "!=", "<", "<=", ">=", ">", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "e", "E", "A", "B", "C", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\r", "\n", "/*", "*/"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "int", "double", "var", "proc", "const", "if", "then", "else", "while", "do"

                              Syntax

                              prog:
                                       TROLLEY constantidentifier CONTAINS declaration* CHECKOUT statement DONE SEMI
                              @@ -164,5 +174,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/11101.rsc b/tank/tescol/11101.rsc index fa172eee..644a9e63 100644 --- a/tank/tescol/11101.rsc +++ b/tank/tescol/11101.rsc @@ -54,7 +54,7 @@ syntax Loop WHILE Booleanexpression DO Statement ; syntax Expression - = Procedureapplication p1 + = p1: Procedureapplication | Booleanexpression b1 (QUESTION Expression COLON Expression)? ; syntax Booleanexpression diff --git a/tank/tescol/11110.html b/tank/tescol/11110.html index 09e110d0..4b78ea38 100644 --- a/tank/tescol/11110.html +++ b/tank/tescol/11110.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 72
                              • Number of top alternatives: 84
                              • Number of defined nonterminal symbols: 72
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 6: prog, COMMA, LBRACE, RBRACE, WS, COMMENTS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ",", "{", "}", "-", "(", ")", ";", ":", "?", "==", "!=", "<", "<=", ">=", ">", "/\\", "\\/", ":=", "+", "/", "*", "**", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", "\t", "\n", "\r", ".", "/*", "*/"
                              • Keywords: 15: "if", "then", "else", "while", "do", "done", "trolley", "contains", "skip", "checkout", "int", "double", "const", "var", "proc"

                              Syntax

                              prog:
                                       stat+
                              @@ -175,5 +185,5 @@
                                       "/*" any* "*/"
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/11110.rsc b/tank/tescol/11110.rsc index 20a75d5c..1fd269d7 100644 --- a/tank/tescol/11110.rsc +++ b/tank/tescol/11110.rsc @@ -49,11 +49,11 @@ syntax SingleStatement = SkipStm | LoopStm | CondStm - | AssgStm a + | a: AssgStm ; syntax Statement - = SingleStatement e - | ListofStatement b + = e: SingleStatement + | b: ListofStatement ; syntax SkipStm = @@ -73,7 +73,7 @@ syntax AssgStm ; syntax ArithmeticExpr = ConditionalExpr - | ApplyProcedure a + | a: ApplyProcedure ; syntax ApplyProcedure = diff --git a/tank/tescol/11111.html b/tank/tescol/11111.html index e9cc7b79..e4d65837 100644 --- a/tank/tescol/11111.html +++ b/tank/tescol/11111.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 70
                              • Number of top alternatives: 87
                              • Number of defined nonterminal symbols: 70
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 4: program, NEWLINE, WS, COMMENT
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 107
                              • Special terminal symbols: 92: ";", ":", ":=", "(", ")", "{", "}", ",", "+", "-", "/", "*", "**", "==", "!=", ">", ">=", "<", "<=", "/\\", "\\/", "?", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\r", "\n", " ", "\t", "/*", "*/", "."
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "var", "const", "proc", "int", "double", "if", "then", "else", "while", "do"

                              Syntax

                              program:
                                       TROLLEY CONSTID CONTAINS declaration* CHECKOUT statement SEMI DONE SEMI
                              @@ -176,5 +186,5 @@
                                       (("+" | "-")? ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+)? "." ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+? (("e" | "E") ("+" | "-")? ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+)?
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.
                              diff --git a/tank/tescol/reference.html b/tank/tescol/reference.html index e1c73735..e4f96ac9 100644 --- a/tank/tescol/reference.html +++ b/tank/tescol/reference.html @@ -15,7 +15,17 @@ border-collapse: collapse; background-color: #ECECEC; } -

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: +

                              Browsable TESCOL Grammar

                              CC-BY

                              Extracted and/or recovered by Vadim Zaytsev, see Grammar Tank for details.

                              Source used for this grammar: Bernd Fischer, COMP2010: Compiler Engineering course work (11 March – 22 April 2010)

                              Summary

                              • Number of production rules: 75
                              • Number of top alternatives: 152
                              • Number of defined nonterminal symbols: 75
                              • Root nonterminal symbols: —
                              • Other top nonterminal symbols: 3: program, number, WS
                              • Bottom nonterminal symbols: —
                              • Number of used terminal symbols: 105
                              • Special terminal symbols: 90: ":", ":=", ",", ";", "(", ")", "{", "}", "+", "-", "*", "/", "**", "/\\", "\\/", "==", "!=", "<", "<=", ">", ">=", "?", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ".", "_", " ", "\t", "\r", "\n"
                              • Keywords: 15: "done", "skip", "trolley", "checkout", "contains", "const", "var", "proc", "if", "then", "while", "do", "else", "int", "double"

                              Syntax

                              program:
                                       TROLLEY CONSTID CONTAINS (declaration SEMI)* CHECKOUT statement SEMI DONE SEMI
                              @@ -246,5 +256,5 @@
                                       (" " | "\t" | "\r" | "\n")+
                               

                              Maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. - Last updated: 16/09/2011. + Last updated: 03/10/2012.