LLK Changes
The major change that may given to many troubles is change in util project CLIUtil
that now require to use -- for long options as in --longopt and allow multiple short
options as in -aeiou .
Grammar
- CHANGE - Renamed lexer grammar option
LexerTokenUseText to TokenUseText .
- NEW - Added lexer grammar option
TokenUseIntern . When it is
on and TokenUseText options is on , the llkCreateToken methods:
llkCreateToken(int type);
llkCreateToken(int type, int start, int end);
llkCreateToken(int type, int start, int end, Object data);
automatically intern all the literal token text and token text that is 8 characters or less using an
SingletonSet . Default is disabled . This is also an String
llkIntern(String s) method that can be used to intern any text, eg:
llkCreateToken(type, start, end, llkIntern(text), null);
Implementation
- CHANGE - Code generator no longer add
final
modifier to the generated rule methods.
Support Projects Changes
llk-share
- NEW - Added
ILLKTreeParser .
- CHANGE - Renamed
ILLKNode.getModifier() and ILLKNode.setModifier(int mod) to getModifiers() and setModifiers(int
mod) .
- CHANGE -
ILLKNode now extends List<ILLKNode> although LLKNode.template left most extra methods in the
List interface as unsupported.
- CHANGE - Removed
ILLKMain.exit() and SimpleLLKMain.exit() method which is not a good practice, throw a RuntimeException
instead.
- CHANGE -
SimpleLLKMain.getFileContent(String fpath, Charset charset)
now read from System.in if file path is "-".
llk-share-formatter
- FIXED - emitDotSuffix() that emitted extra spaces when oneliner fails.
util
- CHANGE - Getopt support stuffs are moved from the
Msg class to the CLIUtil class.
- CHANGE - Long options now must be prefixed by "--" and multiple
short options can now be specified in single option (eg. -abc stands for -a -b -c). This affects all
command line utilities in the LLK and support projects.
- CHANGE-
TextUtil.splitLines() and TextUtil.removeFirstLine() now ignore \\ escaped CR and LF.
- CHANGE - Refactored
TextUtil.readFile() methods to
FileUtil.asChars() , ... etc. methods.
fireant
- See change for
fireant project here.
Sample Grammar Changes
General
llk-java-model
- NEW - Added formatter options:
compactStatementBlock - remove blank lines between statements.
compactCloseBrace - put multiple consecutive close braces on the
same line.
- FIXED - Parser grammar to accept interface, enum declarations inside
compound statements.
- FIXED - Special tokens eg.
CPPCOMMENT that follows on the same
line as end of a multi-line comment is not formatted correctly.
- FIXED - Fixed problem that blank lines between statements in
constructor is not preserved.
llk-csharp-model
- NEW - Added formatter options:
compactStatementBlock - remove blank lines between statements.
compactCloseBrace - put multiple consecutive close braces on the
same line.
- FIXED - Special tokens eg.
CPPCOMMENT that follows on the same line as
end of a multi-line comment is not formatted correctly.
llk-html
- CHANGE - End tag for empty tag (eg. link) is now ignored and generate warnings
instead of generating end tag mismatch error.
- CHANGE - Added format style
BLOCK1 which format the block tag as
oneliner only if it has no more than one child (eg. for TR tag).
llk-xhtml
- CHANGE - XHTML tag not lower case is now a warning instead of error.
- CHANGE - Added format style
BLOCK1 which format the block tag as
oneliner only if it has no more than one child (eg. for TR tag).
llk-xml
- CHANGE - Moved
XMLSpaceUtil.java to util project.
- CHANGE -
XMLFormatter now would not put more than one element on the
same line and only try to format leaf elements as oneliner.
|