pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
1997-09-19
1997-09-19 06:45:32 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
ba62cf75ae87d44e669cfcc5e1ce37d899216110 (
12
lines) (+
9
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
switch() hacked
Rev: src/docode.c:1.22
Rev: src/language.yacc:1.49
156:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
48
1997/09/
11
19:
53
:
44
grubba
Exp $");
+
RCSID("$Id: language.yacc,v 1.
49
1997/09/
19
06
:
45
:
32
hubbe
Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
331:
%type <n> m_expr_list %type <n> m_expr_list2 %type <n> new_local_name
+
%type <n> optional_comma_expr
%type <n> optional_else_part %type <n> return %type <n> sscanf
1010:
{ $$=mknode(F_CASE,$2,0); }
-
| F_CASE comma_expr F_DOT_DOT comma_expr ':'
+
| F_CASE comma_expr F_DOT_DOT
optional_
comma_expr ':'
{
-
$$=mknode(F_CASE,$2,$4);
+
$$=mknode(F_CASE,
$4?
$2
:0
,$4
?$4:$2
);
} ;
1037:
unused2: comma_expr { $$=mkcastnode(void_type_string,$1); } ;
+
optional_comma_expr: { $$=0; }
+
| comma_expr
+
;
+
comma_expr: comma_expr2 | type2 {