[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new SableCC.altgen.20040110 release



Alternative generation system allows SableCC to target other
languages besides Java, for example C++ and C#.

I've released a new version of the alternative generation system.
This release is long overdue, as most changes were done a month ago.

This is not an official sablecc release. This is experimental stuff.
You've been warned :)

The binary&source distribution is avilable from my homepage:
	http://www.mare.ee/indrek/sablecc/
and also from the SableCC subversion repository:
	svn://svn.sablecc.org/developers/indrek/sandbox/sablecc-indrek/

Supported languages:
 - java, C++, C#, XML and graphviz's dot formated files of the AST.

News:
 - there are no more multiple packages
 - everything is integrated into one sablecc package and my source branch
 - no more dependencies on XSL or Apache Xalan
 - XSS has now a stand alone interpreter
 - no more EcmaScript support inside the XSS
 - xss templates come with the archive, java, c++, c# and others
 - generation syntax changed, now options on the sablecc binary
 - XML structure was changed a bit, some element names were changed
   also many additional properties to make C++ generation simpler without
   the use of EcmaScript
 - sablecc does not generate anymore anything in the native mode,
   only outputs xss based files
 - caching of analyzed parser data for fast generation: useful for
   xss development

Also see the attached README.altgen.txt

This release contains lots of changes. So if anything does not work for 
you please let me know.

Regards,
Indrek
New sablecc syntax:
  sablecc [-c cache.file] [-d destination] [-t target|file.xss[,..]] \
      [-p key value] [-o path] filename [filename]...

This file describes the alternative generation system usage.
Currently available language targets and parameters:

Java
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  java
  java-build
    - package = <default from grammar file>
    - src = '.'

C++
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cxx
  cxx-build
    - package = <default from grammar file> - namespace in C++

C#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  csharp
  csharp-build
    - package = <default from grammar file>

XML
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  xml

Graphviz's DOT graph visualization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  dotgraph-simple
      Will generate a simple non-repeated DAG

  dotgraph-tree
      Will generate a DAG but repeat productions unless they are
      already specified up the tree (no recursion, DAG)

  dotgraph-graph
      Will generate a true graph.

For example to generate java parser with source files under src/
directory and also generate the build.xml and README.parser files
run following:

  % sablecc -t java,java-build -p src src grammar-file.sablecc3

In practical development process one might choose to generate
the build systems only once and later modify those by hand.
See individual README.parser files for more information in the
generated parser source tree.

Caching (-c)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The new sablecc's -c option is currenly mostly useful for xss
writers/developers as grammar analysis is skipped.