Mercurial > octave-nkf
comparison src/parse.y @ 8701:1652e39b934e
handle command names in declaration lists
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 09 Feb 2009 12:23:12 -0500 |
parents | b227213a70c3 |
children | 6dc61981d18b |
comparison
equal
deleted
inserted
replaced
8700:314be237cd5b | 8701:1652e39b934e |
---|---|
927 | 927 |
928 // ===================== | 928 // ===================== |
929 // Declaration statemnts | 929 // Declaration statemnts |
930 // ===================== | 930 // ===================== |
931 | 931 |
932 declaration : GLOBAL decl1 | 932 parsing_decl_list |
933 { $$ = make_decl_command (GLOBAL, $1, $2); } | 933 : // empty |
934 | STATIC decl1 | 934 { lexer_flags.looking_at_decl_list = true; } |
935 { $$ = make_decl_command (STATIC, $1, $2); } | 935 |
936 declaration : GLOBAL parsing_decl_list decl1 | |
937 { | |
938 $$ = make_decl_command (GLOBAL, $1, $3); | |
939 lexer_flags.looking_at_decl_list = false; | |
940 } | |
941 | STATIC parsing_decl_list decl1 | |
942 { | |
943 $$ = make_decl_command (STATIC, $1, $3); | |
944 lexer_flags.looking_at_decl_list = false; | |
945 } | |
936 ; | 946 ; |
937 | 947 |
938 decl1 : decl2 | 948 decl1 : decl2 |
939 { $$ = new tree_decl_init_list ($1); } | 949 { $$ = new tree_decl_init_list ($1); } |
940 | decl1 decl2 | 950 | decl1 decl2 |