User loginNavigation |
archivesInverse typechecker and theorem proving in intuitionistic and classical logicsAnother cool demonstration from Oleg:
By Ehud Lamm at 2006-02-05 09:09 | Fun | Lambda Calculus | Type Theory | 4 comments | other blogs | 9645 reads
Extensible Term LanguageI’m currently working on open source project that has a goal to create a language definition framework that can be used as textual DSL construction kit. The framework is currently named Extensible Term Language (ETL). This language definition framework is very similar by architecture to XML. The framework has just reached its first public version. * There is language definition language that is defined using framework itself (this aspect is more like XML Schema or Relax NG rather than DTD). This is a basic dog-food test for such framework. * It works with plain text. - Non ETL-aware editors can work with languages defined using ETL - There is no special hidden markup. - It is possible to have and edit incorrect text. Even if syntax changes (for example some keyword is renamed). It is possible to fix source using normal text manipulation tools. * It allows for agile definition of underlying model, language, and instance sources. * The syntax has underlying document object model. * There may be a lot of different implementation of parsers and many models of parser like AST, DOM, push, or pull parsers. * The language definition framework specifies syntax and mapping to model rather than semantics of the language. It is possible to build semantic aware tools, but they should live above the language like it is now with XML. * There are no build-in transformation facilities, but it is possible to define facilities using means above the framework. Such facilities might work on AST level or on more detailed levels (for example there is a tool that transforms source file to html basing on grammar definition). * The language defines common lexical layer and common phrase level. * Like XML it allows creating reusable language modules. These language modules can be exchanged between tools. There are few samples of such reuse in the package. However there are also differences from XML: * ETL syntax is believed (by me) to be much more usable than XML. It is possible to define traditionally looking programming languages using it. See samples in the referenced package (for example there is a grammar for Java-like language named EJ). * One must have a grammar to derive underlying object model from source code. However such grammar may be created independently (in that case object model will be different from original intention of author). In XML the grammar is used mostly for validation and specifying syntax of text values, and object model is self-evident from source. The project is still in pre-alpha stage. There is a working grammar definition language and few extensions are planned for it. There is a ready-to-use parser that can be used in situations when grammar is static, like command line tools (extensions to parser to make it more suitable to dynamic environment like Eclipse are already planned and it is more or less known what to do). The parser is of pull kind. And it is possible to build AST or DOM parsers above it. For example there are ready-to-use AST parsers that build tree of JavaBeans and AST models that have been generated using Eclipse Modeling Framework. The parser itself uses EMF AST during compilation of grammar to executable form. The current version could be downloaded from http://sourceforge.net/project/showfiles.php?group_id=153075&package_id=178546&release_id=391153 Please look at the file doc/readme.html for more details about the package. The file gives references and some explanations for examples. There is also a document that describes motivation for the language. |
Browse archivesActive forum topics |
Recent comments
21 weeks 6 days ago
21 weeks 6 days ago
21 weeks 6 days ago
44 weeks 23 hours ago
48 weeks 2 days ago
50 weeks 1 hour ago
50 weeks 1 hour ago
1 year 3 days ago
1 year 5 weeks ago
1 year 5 weeks ago