aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-17 11:40:08 +1000
committerDavid Walter Seikel2012-01-17 11:40:08 +1000
commite20bc3a36eb5df83b9531e5be2366870eed1b409 (patch)
treea9b9bb576ebead6172dea13b57a405f7bdef726a
parentIdentifiers. (diff)
downloadSledjHamr-e20bc3a36eb5df83b9531e5be2366870eed1b409.zip
SledjHamr-e20bc3a36eb5df83b9531e5be2366870eed1b409.tar.gz
SledjHamr-e20bc3a36eb5df83b9531e5be2366870eed1b409.tar.bz2
SledjHamr-e20bc3a36eb5df83b9531e5be2366870eed1b409.tar.xz
No need to pass param to these.
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.c6
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h6
-rw-r--r--LuaSL/src/LuaSL_lemon_yaccer.y12
3 files changed, 12 insertions, 12 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.c b/LuaSL/src/LuaSL_LSL_tree.c
index 6a0988c..3d53ed7 100644
--- a/LuaSL/src/LuaSL_LSL_tree.c
+++ b/LuaSL/src/LuaSL_LSL_tree.c
@@ -291,7 +291,7 @@ LSL_Leaf *addOperation(LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right)
291 return lval; 291 return lval;
292} 292}
293 293
294LSL_Leaf *addParameter(LuaSL_yyparseParam *param, LSL_Leaf *type, LSL_Leaf *identifier) 294LSL_Leaf *addParameter(LSL_Leaf *type, LSL_Leaf *identifier)
295{ 295{
296 LSL_Identifier *result = calloc(1, sizeof(LSL_Identifier)); 296 LSL_Identifier *result = calloc(1, sizeof(LSL_Identifier));
297 297
@@ -310,7 +310,7 @@ LSL_Leaf *addParameter(LuaSL_yyparseParam *param, LSL_Leaf *type, LSL_Leaf *iden
310 return identifier; 310 return identifier;
311} 311}
312 312
313LSL_Leaf *collectParameters(LuaSL_yyparseParam *param, LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam) 313LSL_Leaf *collectParameters(LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam)
314{ 314{
315 LSL_Leaf *newList = newLeaf(LSL_PARAMETER_LIST, NULL, NULL); 315 LSL_Leaf *newList = newLeaf(LSL_PARAMETER_LIST, NULL, NULL);
316 316
@@ -327,7 +327,7 @@ LSL_Leaf *collectParameters(LuaSL_yyparseParam *param, LSL_Leaf *list, LSL_Leaf
327 return newList; 327 return newList;
328} 328}
329 329
330LSL_Leaf *addFunction(LuaSL_yyparseParam *param, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close, LSL_Leaf *block) 330LSL_Leaf *addFunction(LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close, LSL_Leaf *block)
331{ 331{
332 LSL_Function *func = calloc(1, sizeof(LSL_Function)); 332 LSL_Function *func = calloc(1, sizeof(LSL_Function));
333 333
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 020a92e..c33d77d 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -296,9 +296,9 @@ typedef struct
296 296
297 297
298void burnLeaf(LSL_Leaf *leaf); 298void burnLeaf(LSL_Leaf *leaf);
299LSL_Leaf *addFunction(LuaSL_yyparseParam *param, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close, LSL_Leaf *block); 299LSL_Leaf *addFunction(LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close, LSL_Leaf *block);
300LSL_Leaf *addOperation(LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); 300LSL_Leaf *addOperation(LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right);
301LSL_Leaf *addParameter(LuaSL_yyparseParam *param, LSL_Leaf *type, LSL_Leaf *newParam); 301LSL_Leaf *addParameter(LSL_Leaf *type, LSL_Leaf *newParam);
302LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval); 302LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval);
303LSL_Leaf *addState(LuaSL_yyparseParam *param, LSL_Leaf *identifier, LSL_Leaf *block); 303LSL_Leaf *addState(LuaSL_yyparseParam *param, LSL_Leaf *identifier, LSL_Leaf *block);
304LSL_Leaf *addStatement(LSL_Leaf *lval, LSL_Type type, LSL_Leaf *expr); 304LSL_Leaf *addStatement(LSL_Leaf *lval, LSL_Type type, LSL_Leaf *expr);
@@ -306,7 +306,7 @@ LSL_Leaf *addTypecast(LSL_Leaf *lval, LSL_Leaf *type, LSL_Leaf *rval, LSL_Leaf *
306LSL_Leaf *addVariable(LuaSL_yyparseParam *param, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *assignment, LSL_Leaf *expr); 306LSL_Leaf *addVariable(LuaSL_yyparseParam *param, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *assignment, LSL_Leaf *expr);
307 307
308void beginBlock(LuaSL_yyparseParam *param, LSL_Leaf *block); 308void beginBlock(LuaSL_yyparseParam *param, LSL_Leaf *block);
309LSL_Leaf *collectParameters(LuaSL_yyparseParam *param, LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam); 309LSL_Leaf *collectParameters(LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam);
310void endBlock(LuaSL_yyparseParam *param, LSL_Leaf *block); 310void endBlock(LuaSL_yyparseParam *param, LSL_Leaf *block);
311 311
312void *ParseAlloc(void *(*mallocProc)(size_t)); 312void *ParseAlloc(void *(*mallocProc)(size_t));
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y
index 10e3a33..8fa54e2 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -40,13 +40,13 @@ state(S) ::= LSL_IDENTIFIER(I) stateBlock(B). { S = addState(param, I, B); }
40functionList ::= functionList function. 40functionList ::= functionList function.
41functionList ::= . 41functionList ::= .
42 42
43parameterList(A) ::= parameterList(B) LSL_COMMA(C) parameter(D). { A = collectParameters(param, B, C, D); } 43parameterList(A) ::= parameterList(B) LSL_COMMA(C) parameter(D). { A = collectParameters(B, C, D); }
44parameterList(A) ::= parameter(D). { A = collectParameters(param, NULL, NULL, D); } 44parameterList(A) ::= parameter(D). { A = collectParameters(NULL, NULL, D); }
45parameterList(A) ::= . { A = collectParameters(param, NULL, NULL, NULL); } 45parameterList(A) ::= . { A = collectParameters(NULL, NULL, NULL); }
46parameter(A) ::= type(B) LSL_IDENTIFIER(C). { A = addParameter(param, B, C); } 46parameter(A) ::= type(B) LSL_IDENTIFIER(C). { A = addParameter(B, C); }
47// Causes a conflict when it's an empty parameterList with calling the same type of function. 47// Causes a conflict when it's an empty parameterList with calling the same type of function.
48function(A) ::= LSL_IDENTIFIER(C) LSL_PARENTHESIS_OPEN(D) parameterList(E) LSL_PARENTHESIS_CLOSE(F) funcBlock(G). { A = addFunction(param, NULL, C, D, E, F, G); } 48function(A) ::= LSL_IDENTIFIER(C) LSL_PARENTHESIS_OPEN(D) parameterList(E) LSL_PARENTHESIS_CLOSE(F) funcBlock(G). { A = addFunction(NULL, C, D, E, F, G); }
49function(A) ::= type(B) LSL_IDENTIFIER(C) LSL_PARENTHESIS_OPEN(D) parameterList(E) LSL_PARENTHESIS_CLOSE(F) funcBlock(G). { A = addFunction(param, B, C, D, E, F, G); } 49function(A) ::= type(B) LSL_IDENTIFIER(C) LSL_PARENTHESIS_OPEN(D) parameterList(E) LSL_PARENTHESIS_CLOSE(F) funcBlock(G). { A = addFunction(B, C, D, E, F, G); }
50 50
51// Blocks. 51// Blocks.
52 52