From 3ce6f6249cb1afe615a5a716a7d7bc50f8eb75d5 Mon Sep 17 00:00:00 2001 From: grammarware Date: Wed, 12 May 2010 15:33:14 +0000 Subject: [PATCH] different presentation style for the Zoo git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@801 ab42f6e0-554d-0410-b580-99e487e6eeb2 --- shared/tools/bgf2html | 24 ++ shared/xsl/zoo2xhtml.xslt | 200 ++++++++++ www/Makefile | 2 +- www/config.zoo | 144 +++---- www/zoo/index.html | 787 ++++++++++++++++++++++++++------------ www/zoo/zoo.css | 3 +- 6 files changed, 844 insertions(+), 316 deletions(-) create mode 100755 shared/tools/bgf2html create mode 100644 shared/xsl/zoo2xhtml.xslt diff --git a/shared/tools/bgf2html b/shared/tools/bgf2html new file mode 100755 index 00000000..b72acd8a --- /dev/null +++ b/shared/tools/bgf2html @@ -0,0 +1,24 @@ +#!/bin/sh + +LOCAL=${PWD} +cd `dirname $0` +cd ../.. +SLPS=${PWD} +cd ${LOCAL} + +if [ $# -eq 1 ]; then + OUTPUT=/dev/stdout +elif [ $# -ne 2 ]; then + echo "This tool transforms BGF grammars to hypertext EBNF." + echo "Usage: bgf2html []" + echo "When output file is not specified, stdout is used." + exit 1 +else + OUTPUT=$2 +fi +if [ ! -r $1 ]; then + echo "Oops: $1 not found or not readable." + exit 1 +fi + +xsltproc ${SLPS}/shared/xsl/bgf2xhtml.xslt $1 | grep -v 'DOCTYPE' > ${OUTPUT} diff --git a/shared/xsl/zoo2xhtml.xslt b/shared/xsl/zoo2xhtml.xslt new file mode 100644 index 00000000..a70e6c79 --- /dev/null +++ b/shared/xsl/zoo2xhtml.xslt @@ -0,0 +1,200 @@ + + + + + + + + + + Software Language Processing Suite — Grammar Zoo + + + + +

+ Software Language Processing Suite +
+ Grammar Zoo +
+ + +

+ +
+

+ + +
+
+ + + + + + + + +

+ +

+ + +

+ +
+
+ +
+
+ [SLPS] + + Last updated: + + +
+ + XHTML 1.0 + + + CSS 2.1 + +
+ + +
+
diff --git a/www/Makefile b/www/Makefile index 816bb1a8..98a1ecb1 100644 --- a/www/Makefile +++ b/www/Makefile @@ -14,4 +14,4 @@ build: make -f Makefile.cpp.zoo make -f Makefile.csharp.zoo make -f Makefile.java.zoo - xsltproc ../shared/xsl/zoo2xhtml.xslt config.zoo > zoo/index.html + xsltproc --stringparam date `date +"%d/%m/%Y"` ../shared/xsl/zoo2xhtml.xslt config.zoo > zoo/index.html diff --git a/www/config.zoo b/www/config.zoo index a5af5d4b..a23c418e 100644 --- a/www/config.zoo +++ b/www/config.zoo @@ -9,11 +9,11 @@ December 1999 Annex A, pages 402–416 - Extracted grammar + Extracted iso-9899-1999 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -22,7 +22,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + ISO C 2005 @@ -30,11 +30,11 @@ May 2005 Annex A, pages 403–417 - Extracted grammar + Extracted iso-9899-tc2 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -43,7 +43,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + ISO C 2007 @@ -51,11 +51,11 @@ September 2007 Annex A, pages 403–418 - Extracted grammar + Extracted iso-9899-tc3 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -64,7 +64,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + @@ -76,11 +76,11 @@ September 1998 Annex A, pages 667–684 - Extracted grammar + Extracted iso-14882-1998 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -89,7 +89,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + @@ -109,11 +109,11 @@ PDF - Extracted grammar + Extracted ecma-334-1 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -122,7 +122,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + ECMA C# 2002 @@ -138,11 +138,11 @@ PDF - Extracted grammar + Extracted ecma-334-2 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -151,7 +151,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + ECMA C# 2005 @@ -166,11 +166,11 @@ PDF - Extracted grammar + Extracted ecma-334-3 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -179,7 +179,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + ECMA C# 2006 @@ -194,11 +194,11 @@ PDF - Extracted grammar + Extracted ecma-334-4 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -207,7 +207,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + ISO C# 2003 @@ -236,8 +236,8 @@ Slides - - Recovery tools + + Recovery http://gdk.sourceforge.net/ GDK @@ -246,9 +246,9 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - - - Transformation scripts + + + Transformation http://slps.svn.sourceforge.net/viewvc/slps/topics/recovery/csharp/trafo/deyaccify.trafo?view=markup deyaccify @@ -273,7 +273,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/recovery/csharp/trafo/modularise.trafo?view=markup modularise - + ISO C# 2006 @@ -288,11 +288,11 @@ PDF.ZIP - Extracted grammar + Extracted iso-23270-2006 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -301,7 +301,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + Microsoft C# 1.0 @@ -312,11 +312,11 @@ DOC - Extracted grammar + Extracted msft-ls-1.0 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -325,7 +325,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + Microsoft C# 1.2 @@ -336,11 +336,11 @@ DOC - Extracted grammar + Extracted msft-ls-1.2 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -349,7 +349,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + Microsoft C# 3.0 @@ -360,11 +360,11 @@ DOC - Extracted grammar + Extracted msft-ls-3.0 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -373,7 +373,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + Microsoft C# 4.0 @@ -384,11 +384,11 @@ DOC - Extracted grammar + Extracted msft-ls-4.0 - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/pdf2lll.py?view=markup PDF⇒LLL @@ -397,7 +397,7 @@ http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/lll2bgf.py?view=markup LLL⇒BGF - + @@ -416,11 +416,11 @@ PDF - Readable grammar + Readable jls1-read - Implementable grammar + Implementable jls1-impl @@ -461,13 +461,13 @@ Slides - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/html2bgf.py?view=markup HTML⇒BGF - + J2SE 1.2 “Playground” @@ -482,11 +482,11 @@ PDF - Readable grammar + Readable jls2-read - Implementable grammar + Implementable jls2-impl @@ -527,13 +527,13 @@ Slides - - Extraction tools + + Extraction http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/html2bgf.py?view=markup HTML⇒BGF - + J2SE 5.0 “Tiger” @@ -548,11 +548,11 @@ PDF - Readable grammar + Readable jls3-read - Implementable grammar + Implementable jls3-impl @@ -593,13 +593,13 @@ Slides - + Extraction tools http://slps.svn.sourceforge.net/viewvc/slps/topics/extraction/bnf2bgf/html2bgf.py?view=markup HTML⇒BGF - + diff --git a/www/zoo/index.html b/www/zoo/index.html index 334ea26d..0b3d2afa 100644 --- a/www/zoo/index.html +++ b/www/zoo/index.html @@ -6,165 +6,259 @@ Software Language Processing Suite

Grammar Zoo -

CC++C#Java

C

ISO C 1999
ISO/IEC 9899:1999(E) Programming languages — C (December 1999), Annex A, pages 402–416
ISO C 2005
ISO/IEC 9899:TC2 WG14/N1124 Committee Draft (May 2005), Annex A, pages 403–417

ISO C 2005

  • Source: ISO/IEC 9899:TC2 WG14/N1124 Committee Draft (May 2005), Annex A, pages 403–417
  • Extraction tools: [PDF⇒LLL] [LLL⇒BGF] -
ISO C 2007
ISO/IEC 9899:TC3 WG14/N1256 Committee Draft (September 2007), Annex A, pages 403–418

ISO C 2007

  • Source: ISO/IEC 9899:TC3 WG14/N1256 Committee Draft (September 2007), Annex A, pages 403–418
  • Extraction tools: [PDF⇒LLL] [LLL⇒BGF] -

C++

ISO C++ 1998
ISO/IEC 14882:1998(E) Programming languages — C++ First edition (September 1998), Annex A, pages 667–684

C++

ISO C++ 1998

ISO C++ 1998

  • Source: ISO/IEC 14882:1998(E) Programming languages — C++ First edition (September 1998), Annex A, pages 667–684
  • Extraction tools: [PDF⇒LLL] [LLL⇒BGF] -

C#

ECMA C# 2001
ECMA International Standard ECMA-334, 1st edition (December 2001), Appendix A, pages 339–364 +
  • Extracted grammar:

  • C#

    ECMA C# 2001ECMA C# 2002ECMA C# 2005ECMA C# 2006ISO C# 2003ISO C# 2006Microsoft C# 1.0Microsoft C# 1.2Microsoft C# 3.0Microsoft C# 4.0

    ECMA C# 2001

    • Source: ECMA International Standard ECMA-334, 1st edition (December 2001), Appendix A, pages 339–364 [Archive] [PDF] -
    ECMA C# 2002
    ECMA International Standard ECMA-334, 2nd edition (December 2002), Appendix A, pages 335–360 +
  • Extracted grammar:
  • ECMA C# 2002

    • Source: ECMA International Standard ECMA-334, 2nd edition (December 2002), Appendix A, pages 335–360 [Archive] [PDF] -
    ECMA C# 2005
    ECMA International Standard ECMA-334, 3rd edition (June 2005) +
  • Extracted grammar:
  • ECMA C# 2005

    ECMA C# 2006
    ECMA International Standard ECMA-334, 4th edition (June 2006) +
  • Extracted grammar:
  • ECMA C# 2006

    ISO C# 2003
    ISO/IEC 23270:2003(E) Information technology — Programming languages — C# First edition (2003)

    ISO C# 2003

    • Source: ISO/IEC 23270:2003(E) Information technology — Programming languages — C# First edition (2003)
    • Recovery tools: [GDK] [LLL⇒BGF] -
    • Transformation scripts +
    • Transformation tools: [deyaccify] [adapt] @@ -176,109 +270,268 @@ [expressions] [modularise] -
    ISO C# 2006
    ISO/IEC 23270:2006(E) Information technology — Programming languages — C# Second edition (September 2006) +
  • Extracted grammar grammar:
  • Recovered grammar grammar:
  • V. Zaytsev. Correct C# Grammar too Sharp for ISO. GTTSE 2005. Extended abstract. + [GTTSE] + + [Abstract] + + [Slides] +
  • ISO C# 2006

    • Source: ISO/IEC 23270:2006(E) Information technology — Programming languages — C# Second edition (September 2006) [Standard] [PDF.ZIP] -
    Microsoft C# 1.0
    C# Language Specification. Version 1.0 (2002) +
  • Extracted grammar:
  • Microsoft C# 1.0

    Microsoft C# 1.2
    C# Language Specification. Version 1.2 (2003) +
  • Extracted grammar:
  • Microsoft C# 1.2

    Microsoft C# 3.0
    C# Language Specification. Version 3.0 (2007) +
  • Extracted grammar:
  • Microsoft C# 3.0

    Microsoft C# 4.0
    C# Language Specification. Version 4.0 (2010) +
  • Extracted grammar:
  • Microsoft C# 4.0

    Java

    JDK 1.0
    James Gosling, Bill Joy, Guy Steele, Java Language Specification (1996) +
  • Extracted grammar:

  • Java

    JDK 1.0J2SE 1.2 “Playground”J2SE 5.0 “Tiger”

    JDK 1.0

    J2SE 1.2 “Playground”
    James Gosling, Bill Joy, Guy Steele, Gilad Bracha, Java Language Specification Second Edition (1998) +

    J2SE 1.2 “Playground”

    J2SE 5.0 “Tiger”
    James Gosling, Bill Joy, Guy Steele, Gilad Bracha, Java Language Specification Third Edition (2004) +

    J2SE 5.0 “Tiger”


    +
    -[SLPS]Last updated: 12/04/2010.
    XHTML 1.0CSS 2.1 +[SLPS]Last updated: 12/05/2010
    XHTML 1.0CSS 2.1
    diff --git a/www/zoo/zoo.css b/www/zoo/zoo.css index 9286734c..30c7533e 100644 --- a/www/zoo/zoo.css +++ b/www/zoo/zoo.css @@ -1,4 +1,5 @@ -h1 {text-align:center;} +h1, h2 {text-align:center;} +h2 a {font-size:small;} dt {font-weight: bold;} img {border:0;} .last {width: 100%; text-align: right;}