[antlr-interest] Grammar for TCL & TCL/TK

bob mcwhirter bob at werken.com
Thu Nov 29 05:56:47 PST 2001


Tcl is notoriously easy-to-parse.

I think it'd be roughly 3 lines:

statement : IDENTIFIER expr*;

expr : command_expr | block_expr | terminal_expr;

command_expr : '[' statement ']'

block_expr : '{' expr '}';

terminal_expr : IDENTIFIER | QUOTED_STRING;

That's just off the top of my head.

Things like if{} are handled by the language interpreter itself,
and the grammer really shouldn't have any control structures or
anything.

	-bob


On Thu, 29 Nov 2001, Guillaume Helle (Free) wrote:

> Hello,
> 
> i am looking for a grammar for TCL & TCL/TK...
> Where a can find it?
> 
> Thanks for your help,
> 
> Guillaume Helle
> 
>  
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list