mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-24 11:12:21 +00:00
Rename CONST to VALUE.
VALUE is a much more accurate name, and this allows for "const" to be implemented at some stage.
This commit is contained in:
parent
fe7cd7e7a7
commit
c68578d15d
4 changed files with 18 additions and 18 deletions
|
@ -130,13 +130,13 @@ STRING \"(\\.|[^"\\])*\"
|
|||
qc_yylval.expr = new_integer_expr (i);//FIXME
|
||||
else
|
||||
qc_yylval.expr = new_integer_expr (i);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
{FLOAT} {
|
||||
float f = strtof (yytext, 0);
|
||||
qc_yylval.expr = new_float_expr (f);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
{ID} {
|
||||
|
@ -162,7 +162,7 @@ STRING \"(\\.|[^"\\])*\"
|
|||
sscanf (yytext, "' %f %f %f '",
|
||||
&v[0], &v[1], &v[2]);
|
||||
qc_yylval.expr = new_vector_expr (v);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
'{s}*{m}?{FLOAT}{s}+{m}?{FLOAT}{s}+{m}?{FLOAT}{s}+{m}?{FLOAT}{s}*' {
|
||||
|
@ -170,7 +170,7 @@ STRING \"(\\.|[^"\\])*\"
|
|||
sscanf (yytext, "' %f %f %f %f'",
|
||||
&q[0], &q[1], &q[2], &q[3]);
|
||||
qc_yylval.expr = new_quaternion_expr (q);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
'(\\[^xX0-7\r\n]|[^'\r\n]|\\[xX][0-9A-Fa-f]+|\\[0-7]+)*' {
|
||||
|
@ -179,7 +179,7 @@ STRING \"(\\.|[^"\\])*\"
|
|||
if (str[1])
|
||||
warning (0, "multibyte char constant");
|
||||
qc_yylval.expr = new_integer_expr (*str);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
[+\-*/&|^%]= {
|
||||
|
@ -230,7 +230,7 @@ STRING \"(\\.|[^"\\])*\"
|
|||
int ret = do_grab (yytext);
|
||||
if (ret >= 0) {
|
||||
qc_yylval.expr = new_integer_expr (ret);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
} else {
|
||||
BEGIN (-ret);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ int yylex (void);
|
|||
%left '.' '(' '['
|
||||
|
||||
%token <symbol> CLASS_NAME NAME
|
||||
%token <expr> CONST STRING
|
||||
%token <expr> VALUE STRING
|
||||
|
||||
%token LOCAL RETURN WHILE DO IF ELSE FOR BREAK CONTINUE ELLIPSIS
|
||||
%token NIL IFBE IFB IFAE IFA SWITCH CASE DEFAULT ENUM TYPEDEF
|
||||
|
@ -1258,7 +1258,7 @@ arg_list
|
|||
;
|
||||
|
||||
const
|
||||
: CONST
|
||||
: VALUE
|
||||
| NIL { $$ = new_nil_expr (); }
|
||||
| string
|
||||
;
|
||||
|
|
|
@ -111,13 +111,13 @@ FRAMEID {ID}(\.{ID})*
|
|||
{INTEGER} {
|
||||
int i = strtol (yytext, 0, 0);
|
||||
qp_yylval.expr = new_integer_expr (i);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
{FLOAT} {
|
||||
float f = strtof (yytext, 0);
|
||||
qp_yylval.expr = new_float_expr (f);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
{ID} return keyword_or_id (yytext);
|
||||
|
@ -125,7 +125,7 @@ FRAMEID {ID}(\.{ID})*
|
|||
\"(\\.|[^"\\])*\" {
|
||||
const char *s = make_string (yytext, 0);
|
||||
qp_yylval.expr = new_string_expr (s);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
'{s}*{m}{FLOAT}{s}+{m}{FLOAT}{s}+{m}{FLOAT}{s}*' {
|
||||
|
@ -133,7 +133,7 @@ FRAMEID {ID}(\.{ID})*
|
|||
sscanf (yytext, "' %f %f %f '",
|
||||
&v[0], &v[1], &v[2]);
|
||||
qp_yylval.expr = new_vector_expr (v);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
'{s}*{m}{FLOAT}{s}+{m}{FLOAT}{s}+{m}{FLOAT}{s}+{m}{FLOAT}{s}*' {
|
||||
|
@ -141,7 +141,7 @@ FRAMEID {ID}(\.{ID})*
|
|||
sscanf (yytext, "' %f %f %f %f'",
|
||||
&q[0], &q[1], &q[2], &q[3]);
|
||||
qp_yylval.expr = new_quaternion_expr (q);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
{RELOP} {
|
||||
|
@ -168,7 +168,7 @@ FRAMEID {ID}(\.{ID})*
|
|||
int ret = do_grab (yytext);
|
||||
if (ret >= 0) {
|
||||
qp_yylval.expr = new_integer_expr (ret);
|
||||
return CONST;
|
||||
return VALUE;
|
||||
} else {
|
||||
BEGIN (-ret);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ int yylex (void);
|
|||
|
||||
%token <type> TYPE TYPE_NAME
|
||||
%token <symbol> ID
|
||||
%token <expr> CONST
|
||||
%token <expr> VALUE
|
||||
|
||||
%token PROGRAM VAR ARRAY OF FUNCTION PROCEDURE PBEGIN END IF THEN ELSE
|
||||
%token WHILE DO RANGE ASSIGNOP NOT ELLIPSIS
|
||||
|
@ -217,7 +217,7 @@ declarations
|
|||
|
||||
type
|
||||
: standard_type
|
||||
| ARRAY '[' CONST RANGE CONST ']' OF standard_type
|
||||
| ARRAY '[' VALUE RANGE VALUE ']' OF standard_type
|
||||
{
|
||||
$$ = based_array_type ($8, expr_integer ($3), expr_integer ($5));
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ subprogram_declaration
|
|||
current_symtab = current_symtab->parent;
|
||||
current_storage = $<storage>3;
|
||||
}
|
||||
| subprogram_head ASSIGNOP '#' CONST ';'
|
||||
| subprogram_head ASSIGNOP '#' VALUE ';'
|
||||
{
|
||||
build_builtin_function ($1, $4, 0);
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ primary
|
|||
if ($$->type == ex_symbol && extract_type ($$) == ev_func)
|
||||
$$ = function_expr ($$, 0);
|
||||
}
|
||||
| CONST
|
||||
| VALUE
|
||||
| name '(' expression_list ')' { $$ = function_expr ($1, $3); }
|
||||
| '(' expression ')' { $$ = $2; }
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue