1 |
/* |
/* |
2 |
* Copyright (c) 2014-2016 Christian Schoenebeck and Andreas Persson |
* Copyright (c) 2014-2017 Christian Schoenebeck and Andreas Persson |
3 |
* |
* |
4 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
5 |
* |
* |
507 |
PARSE_ERR(@1, (String("No variable declared with name '") + name + "'.").c_str()); |
PARSE_ERR(@1, (String("No variable declared with name '") + name + "'.").c_str()); |
508 |
else if (var->exprType() != INT_ARR_EXPR) |
else if (var->exprType() != INT_ARR_EXPR) |
509 |
PARSE_ERR(@2, (String("Variable '") + name + "' is not an array variable.").c_str()); |
PARSE_ERR(@2, (String("Variable '") + name + "' is not an array variable.").c_str()); |
510 |
|
else if (var->isConstExpr()) |
511 |
|
PARSE_ERR(@5, (String("Variable assignment: Cannot modify const array variable '") + name + "'.").c_str()); |
512 |
|
else if (!var->isAssignable()) |
513 |
|
PARSE_ERR(@5, (String("Variable assignment: Array variable '") + name + "' is not assignable.").c_str()); |
514 |
else if ($3->exprType() != INT_EXPR) |
else if ($3->exprType() != INT_EXPR) |
515 |
PARSE_ERR(@3, (String("Array variable '") + name + "' accessed with non integer expression.").c_str()); |
PARSE_ERR(@3, (String("Array variable '") + name + "' accessed with non integer expression.").c_str()); |
516 |
else if ($6->exprType() != INT_EXPR) |
else if ($6->exprType() != INT_EXPR) |
842 |
} |
} |
843 |
|
|
844 |
if (! yyres) |
if (! yyres) |
845 |
return yystrlen (yystr); |
return (int) yystrlen (yystr); |
846 |
|
|
847 |
return yystpcpy (yyres, yystr) - yyres; |
return int( yystpcpy (yyres, yystr) - yyres ); |
848 |
} |
} |