Uniform token naming convention.

This commit is contained in:
Stefano Sanfilippo 2014-12-02 14:14:58 +01:00
parent 5160c82adb
commit e984b5d0ea
2 changed files with 5 additions and 5 deletions

View File

@ -163,7 +163,7 @@ CHAR [a-zA-Z_]
return token::COLON; return token::COLON;
} }
"blinda la supercazzo"("r"|"l")"a" { "blinda la supercazzo"("r"|"l")"a" {
return token::FUNDECL; return token::FUN_DECL;
} }
"con" { "con" {
return token::PARAMS; return token::PARAMS;
@ -172,7 +172,7 @@ CHAR [a-zA-Z_]
return token::COMMA; return token::COMMA;
} }
("b"|"p")"rematurata la supercazzo"("r"|"l")"a" { ("b"|"p")"rematurata la supercazzo"("r"|"l")"a" {
return token::FUNCALL; return token::FUN_CALL;
} }
"o scherziamo"("?")? { "o scherziamo"("?")? {
return token::FUN_END; return token::FUN_END;

View File

@ -60,7 +60,7 @@
%token LOOP_BEGIN LOOP_CONDITION %token LOOP_BEGIN LOOP_CONDITION
%token BRANCH_CONDITION BRANCH_BEGIN BRANCH_ELSE BRANCH_END CASE_END %token BRANCH_CONDITION BRANCH_BEGIN BRANCH_ELSE BRANCH_END CASE_END
%token COLON COMMA %token COLON COMMA
%token FUNDECL PARAMS FUNCALL FUN_END %token FUN_DECL PARAMS FUN_CALL FUN_END
%token ABORT %token ABORT
%token ID NUMBER FLOAT %token ID NUMBER FLOAT
@ -155,7 +155,7 @@ fun_decls:
fun_decls fun_decls
; ;
fun_decl: fun_decl:
FUNDECL fun_return ID { FUN_DECL fun_return ID {
funArgStack.push(new FunArgList()); funArgStack.push(new FunArgList());
} args FUN_END { } args FUN_END {
stmtStack.push(new StatementList()); stmtStack.push(new StatementList());
@ -305,7 +305,7 @@ case_stmt:
} }
; ;
fun_call: fun_call:
FUNCALL { FUN_CALL {
argsStack.push(new ExpressionList()); argsStack.push(new ExpressionList());
} }
ID call_args FUN_END { ID call_args FUN_END {