class Pascal extends Parser;
options{
buildAST=true;
}
tokens
{
// -- HQL Keyword tokens --
ALL="all";
}
//use testLiterals=true to define IDENT and set buildAST=true; ,so parser can use tokens{ }
define.else not.
IDENT options { testLiterals=true; }
: ID_START_LETTER ( ID_LETTER )*
;
protected
ID_START_LETTER
: '_'
| '$'
| 'a'..'z'
| '\u0080'..'\ufffe' // HHH-558 : Allow unicode chars in identifiers
;
protected
ID_LETTER
: ID_START_LETTER
| '0'..'9'
;
posted on 2006-09-07 15:12
R.Zeus 阅读(292)
评论(0) 编辑 收藏 所属分类:
ANTLR