[antlr-interest] ANTLRWorks 1.0b11 available

Ilia Kantor ilia at obnovlenie.ru
Tue Apr 24 02:56:19 PDT 2007


Thanks a lot, Jean.

Where is bugzilla for Antlr Works ?

There is a number of bugs still remains unfixed till very early versions of this plugin

-> when I press ctrl-z (undo), IDEA hangs I have to restart it and loose a bunch of changes

-> rewrite + tokens still buggy

E.g check this grammar against input of

#{ok.b.c}

NullPointerExceptions gonna follow.

---------------------------------------------

grammar GetScopeValue;

options {
output=AST;
}

tokens {
	TEXT;
	GET_PROPERTY_VALUE;
}

LCURL	:	'{';
RCURL	:	'}';

GET_SCOPE_VALUE
	:	'#';
	

DOT	:	'.';



MINUS
	:	'-';

GT	:	'>';

SPECIAL_CHAR
	:	'`' | '!' | '@' | '$' | '%' | '^' | '&' | '*' | '(' | ')' |  
	'+' | '=' | '[' | ']' | ';' | ':' | '\'' | '"' | '\\' | '|' | ',' | '<' |
	 '/' | '?';
	


fragment WS_CHAR  :
       (' '|'\r'|'\t'|'\u000C'|'\n' )
    ;
    
WS	:	WS_CHAR+;

// not SPECIAL_CHAR not WS_CHAR
WORD:	
	(~ ('`' | '!' | '@' | '$' | '%' | '^' | '&' | '*' | '(' | ')' |  
	'+' | '=' | '[' | ']' | ':' | '\'' | '"' | '\\' | '|' | ',' | '<' | '/' | '?'
	| '{' 
	| '~'
	| '}'
	| '#'
	| ';'
	| '.'
	| '-'
	| '>'	
	| ' '|'\r'|'\t'|'\u000C'|'\n' ) )+ 
;



document
	:	exprs;


exprs:
        (expr)+
;


expr
        :
                text | rule_call
        ;


rule_call: GET_SCOPE_VALUE WORD -> ^(GET_SCOPE_VALUE WORD) |
	GET_SCOPE_VALUE LCURL WORD rule_long_def_part* RCURL -> ^(GET_SCOPE_VALUE WORD rule_long_def_part*)
	;
	

	
rule_long_def_part
	:	MINUS GT WORD -> ^(GET_PROPERTY_VALUE WORD) | 
		DOT WORD -> ^(GET_SCOPE_VALUE WORD)
	;


text:
	DOT -> TEXT[$DOT] | MINUS -> TEXT[$MINUS] | WORD -> TEXT[$WORD] 
	| WS -> TEXT[$WS] | GT -> TEXT[$GT] | SPECIAL_CHAR -> TEXT[$SPECIAL_CHAR]
;

--------------------------------
 
> ANTLRWorks 1.0b11 is now available (with ANTLR 3.0b7):
> 
> http://www.antlr.org/works/index.html
> 
> The changes for this version are:
> 
> New feature:
>      [AW-8] - Backup file
>      [AW-15] - Use the Tab key to indent/unindent text
>      [AW-25] - Add command-line options for ANTLR
>      [AW-33] - Optional generation and compilation step before debugging
> 
> Bug fix:
>      [AW-26] - Null pointer exception when generating a tree parser  
> grammar
>      [AW-28] - Syntax coloring does take into account empty rewrite  
> syntax
>      [AW-29] - Syntax coloring reports an error when using double- 
> quoted string in an argument block
>      [AW-30] - Interpreter does not ignore rules with $channel=HIDDEN;
>      [AW-34] - Plugin in IntelliJ for Windows reports incorrect  
> grammar name while it is correct
>      [AW-35] - Error when compiling a grammar within IntelliJ on Windows
>      [AW-36] - Rules grouping causes ANTLRWorks to run out of heap space
> 
> Note that ANTLRWorks now requires Java 1.5 to run. Also, new online  
> help has been added (and is still in progress):
> 
> http://www.antlr.org/works/help/index.html
> 
> The plugin for IntelliJ will be updated later tonight when the  
> website of Jetbrains for the plugin will be again accessible :-)
> 
> Regards,
> 
> Jean
> 
> 




More information about the antlr-interest mailing list