Releases

From Laja
Jump to: navigation, search

Laja2-007-beta

Released: 2013-09-11

Included in Laja:

  • New macro: #stack().

Included in CDD 2.0: This is a complete rewrite of CDD 1.0:

  • Support for different state representations:
    • Immutable state
    • Mutable state
    • String state
    • Map state (java.util.Map)
  • Cleaner separation of the roles: creator, state and behaviour
  • Full support for collections: List, Set and Map
  • Less code generation. In CDD 1.0, a bunch of classes was generated to a java-gen directory. In CDD 2.0, the generated code are added at the end of the state and creator class, which reduces the number of artifacts.

Laja2-006-alpha

Released: 2013-01-04

Included in CDD 1.0 (don't use this version of CDD!):

  • This release is backward compatible with version Laja2-005-beta and is marked as alpha as the support for CDD contains bugs and has some limitations:
    • Lists are the only supported collection type, support for sets and maps will be added in the next version.
    • State and behaviour classes has to be unique. Classes with same name in different packages are not supported.
    • State projection has some limitations.
    • If a state has more than one behaviour representation then all behaviour classes must have the same type of constructor. It's not supported to have one behaviour representation with a constructor that takes a state and another class that takes both a state and a stateBuilder.
    • If a substate is a list of entities and if the list is encapsulated by a list of values and the list contains duplicates then if an element is removed from the behaviour list, the state list and the behaviour list can get out of sync.
  • Fixed a bug in DatabaseConnection.groovy, method executeSql, the connection was not always closed (problem with finally blocks in Groovy).

Laja2-005-beta

Released: 2010-11-28

Includes:

  • New version number of the engine, changed from Laja1 to Laja2. When the version number is increased it indicates that the API in the engine has changed and that all parsers generated by Laja1 must be regenerated to work with Laja2. They must also be shipped with a jar file from version 2, e.g. laja-parser-engine2-005-beta.jar. The following API changes have been introduced:
    • Fixed a minor bug in the parser generator grammar to support the constructor declaration syntax: Name(Example) example;
    • Changed misspelled method name from recieve to receive.
    • Changed name of element from GotoEnd to Complete.
    • Added support for nested comments for .laja and .grammar files.
    • The following statements are now handled correctly: "a":a+:x is treated as ("a":a+):x and "a":a#3:x is treated as ("a":a#3):x.
  • Fixed a bug in method toString() in target classes generated by system function #generateParserDom. Object references is now included correctly.
  • Fixed a minor bug in the Repeat operator: #.
  • Fixed a bug in the parser generator engine, class ElementList, that could occur when the grammar ended with a not (!) operator.
  • Changed so that the system method #createDirectory calls File.mkdir(), #createDirectoryPath still calls File.mkdirs.
  • Now possible to import empty files.
  • When generating a file and something goes wrong, - Error is now shown instead of - OK.
  • When using the operator Repeat (#) with number of repeats, the form (e.g.) new Repeats(4) is used when possible instead of new net.sf.laja.parser.engine1.Repeats(4).
  • Object names in the grammar is now generated correctly. For example when declaring the definition example with AnExample example instead of Example example.
  • Improved support for Apache Ant.

Laja1-004-alpha

Released: 2010-10-17

Includes:

  • Fixed a problem with parent directories: {..}
  • Imported files that do not end with .groovy or .laja is imported as plain text
  • Added support for importing files as plain text, example: #import "file.laja" as text
  • Added examples for generating parsers in the binary distribution laja1-004-alpha.zip.
  • Support for adding "as text" blocks that treats valid Laja commands as text, example: #> .... <#
  • Improved the system function #connectToDatabase() + verified in Oracle. Added support for schemas.
  • Simplified the parser templates by removing support for Java 1.4.
  • Added message "Can not call method with null reference" if trying to call a method on a null reference.
  • Added support for simple comparitions in #local and #return.
  • Added the command #error that stops the execution and prints out a message.
  • The command #read shows an error message if trying to read other sources than .properties files (that currently is the only supported source).
  • Added the system functions #createDirectory() and #createDirectoryPath().

Laja1-003-alpha

Released: 2010-09-11

Includes:

  • Can be extended with new Java archives by adding *.jar files in directory LAJA_HOME/lib (they will be detected when executing Laja).
  • The variables {home}, {strings} and {math} has been added.
  • Changed the way to set variables when executing Laja, e.g: laja x=123.
  • Changed name from user-imports.laja to imports.laja.
  • Added new argument/option when starting Laja: sysimport.
  • The build-in function viewClass now can view both classes and instances of classes.
  • Bugfix: it's now possible to set values in other namespaces, e.g: #set ($ns.abc = 1).
  • Bugfix: it's possible to call methods with null values in the argument list.
  • The system functions fileExists() and directoryExists() also checks that they are files and directories. Added pathExists() to check files and/or directories.
  • Added support for negative values.
  • Changed the way time is handled: time(), date(), datetime() and format(formatting) + added support for overriding the time and date format in imports.laja, see system-imports.laja.
  • Added support for accessing attributes in arbitrary depth, e.g: #set (a.b.c.d.e = 10).
  • Simplified the way lists can access other lists within an assignment in a #set statement.
  • Namespaces is created implicit if not found, the only exception is #set ($ns = $ns2) where $ns2 must exist.
  • Minor changes of the output to the console when executing Laja.
  • Changes in the directory structure. Moved lajatemplate.grammar to doc. Splitted up lib into lib and system-lib.
  • Refactored the handling of references, major changes in the grammar (lajatemplate.grammar). Cleaned up the code.
  • Improved the integration tests, made them very close to acceptance tests.
  • HSQLDB is now not included in the core installation package (can be added by putting it in LAJA_HOME/lib).

Laja1-002-alpha

Released: 2010-06-03 (+ a bug fix 2010-06-08)

Includes:

  • Seamless integration with Groovy. Support for importing Groovy classes with #import, instantiation with the new command.
  • Added support for #function (macros that can return values).
  • Maps can be used as argurments without using the {} syntax in functions, macros, methods and new statements. Example: #mymacro (name: "Smith" age: 45) instead of #mymacro ({name: "Smith" age: 45}).
  • Support for iterating Map's with #foreach.
  • Support for accessing public fields in classes.
  • Keeping the order of attributes (using LinkedHashMap instead of HashMap).
  • New "commands": loadClass, today, time, now, type, instanceof, viewClass, env, fileExists, directoryExists, directoryOrFileExists, print, println, readProperties, connectToDatabase, generateParser.
  • The ".laja" is implicitly added if left out when generating files.
  • All services ($class, $time, $template) has been removed and replaced by functions.
  • {$template.dir} is replaced with {.}. Parent directory (relative to current template) is referenced to by {..}.
  • The file system/system-imports.laja is implicitly imported and loads Laja system functions.
  • Support for executing methods directly on primitives, like 1.toBinaryString(255).

Laja1-001-alpha

Released: 2010-04-21

Contains all the necessary functionality for the build-in parser generator to work.