diff --git a/examples/example0.kola b/examples/example0.kola index 816743c..a96b5b3 100644 --- a/examples/example0.kola +++ b/examples/example0.kola @@ -1,6 +1,158 @@ -#command arg0 arg1(item0, item1) arg2(key0: val0) -This is a text. -#a "\ -" - This \ - is \ No newline at end of file +#name "Orga's Death"\ + by("喜羊羊") + +#background Corridor + #camera from(right) + + #character Ride + Boss! The Car is ready! + #character Orga + Okay! + + #camera on(Kudelia) + #character Orga + #action face to(Kudelia) + Later. + #character Kudelia + Yes. Do be careful. + +#background Street + #character Ride + It's awfully quiet. There aren't any Gjallarhorn soldiers in the city, unlike our main base. + #camera on(Ched) + #character Orga + Yeah, they probably have all their troops over there now. + +#background Corridor + #character chr(Orga, Ride) + #action face direction(right) + #action walk to(Ched) + + #character Ride + It doesn't matter anyone, does it? + #character Orga + You're in a good mood. + #character Ride + Of course! + + #camera on(Ride) + #character Ride + Everyone will be saved, and we've found out Takaki's doing great, I got to do my best, too! + (I'm also do-much-better knight!) + + #character Orga + #action smile + Yeah, you are right. + +#background Street + #character Orga + Everything we've built up so far wasn't for nothing. + #character chr(Orga, Ride) + #action walk_stop + + #character Orga + And from now on, as long as we don't stop, the road will continue! + + #move Car into(Street) direction(from: left_edge, to: center) + #playsound brake + + #character chr(Orga, Ched) + #action face to(Car) + + #camera on(Car) view(back) + #character chr(object: people, source: Car) + #action shoot + #character Ched + #action get_hit + + #camera on(Ride) + #character Orga + #action protect target(Ride) + #action get_hit + + #character chr(object: people, source: Car) + #action get_hit + + #camera on(Orga) + #character Ride + Boss! What are you doing!? BOSS!! + + #character Orga + #action shoot + Huh-aaaaaaahhhhhhhh!!!!! + #character chr(object: people, source: Car) + #action get_hit + Ah! + + #move Car out(Street) direction(from: center, to: right_edge) + + #camera on(Orga) + #character Orga + Huh... I'm a pretty good shot, huh? + #camera on(Ride, Ched) + #character Ride + B- boss... + #character Orga + #action bleed + #camera on(object: blood, source: Orga) + + #camera on(Ched, Orga, Ride) + #character Orga + How come you're stammering like that... Ride! + + #playsound freesia\ + comment("kibo no hana~") + + #character Orga + #action stand_up speed(slowly) + + #character Ride + But... but! + #character Orga + I'm the Boss of Tekkadan, Orga Itsuka, this is nothing to me. + #character Ride + #action shed_tear + No... not for me... + + #camera on(Orga) + #character Orga + Protecting my members is my job! + #character Ched + #action shed_tear + + #character Ride + But...! + #character Orga + Shut up and let's go! + + #camera on(Orga) + #action walk direction(front) speed(slowly) + Everyone's waiting, besides... + + I finally understand now, Mika, we don't need any destinations, we just need to keep moving forward. + As long as we don't stop, the road will continue! + +#background Memory + #character Mikazuki + I won't let you apologize. + #character Orga + Yeah. + + #camera on(Orga) + I know. + +#background Street + #character Orga + I'm not stopping. + + #camera on(Sky) + As long as you all don't stop, I'll be at the end waiting for you! + + #action walk_stop + #action fall_down + #camera on(object: blood, source: Orga) view(up) + #character Orga + ...So hear me well, ... don't you ever stop...... + #camera on(object: finger, source: Orga) + #character Mikazuki + Orga? \ No newline at end of file diff --git a/kola/kolalexer.l b/kola/kolalexer.l index 0d280be..fa5f2bb 100644 --- a/kola/kolalexer.l +++ b/kola/kolalexer.l @@ -14,9 +14,11 @@ letter [A-Za-z] letter_ ({letter}|_) digit [0-9] uint ([1-9]{digit}*|0) +sigint (-?{uint}) hex 0x[0-9A-Za-z]+ bin 0b[01]+ -float (-?{digit}+)(\.{digit}+)?(e-?{digit}+)? +point \.{digit}+ +float (({sigint}\.?{digit}*)|{point})(e-?{digit}+)? literal {letter_}({letter_}|{digit})* string \"([^\"]|\\\r?\n|\\\")*\" text [^#\n\r \t]((.|\\\n)*[^\r\n\\ \t])? @@ -47,7 +49,7 @@ text [^#\n\r \t]((.|\\\n)*[^\r\n\\ \t])? ":" {return(CLN);} \, {return(CMA);} -{uint} {return(NUM);} +{sigint} {return(NUM);} {hex} {return(NUM_H);} {bin} {return(NUM_B);} {float} {return(NUM_F);} diff --git a/kola/lex.yy.c b/kola/lex.yy.c index 11d5b6b..0b598cb 100644 --- a/kola/lex.yy.c +++ b/kola/lex.yy.c @@ -291,24 +291,24 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); #define YY_NUM_RULES 18 #define YY_END_OF_BUFFER 19 -static yyconst short int yy_acclist[55] = +static yyconst short int yy_acclist[61] = { 0, 19, 7, 18, 1, 18, 3, 18, 18, 4, 18, 7, 18, 18, 6, 18, 6, 18, 5, 18, 18, - 18, 8, 18, 9, 18, 12, 18, 18, 13, 16, - 18, 13, 16, 18, 11, 18, 17, 18, 7, 1, - 3, 2, 6, 5, 10, 16, 13, 16, 17, 10, - 16, 15, 16, 14 + 18, 8, 18, 9, 18, 12, 18, 18, 18, 13, + 16, 18, 13, 16, 18, 11, 18, 17, 18, 7, + 1, 3, 2, 6, 5, 10, 13, 16, 13, 16, + 16, 16, 16, 13, 16, 17, 10, 15, 16, 14 } ; -static yyconst short int yy_accept[58] = +static yyconst short int yy_accept[61] = { 0, 1, 1, 1, 1, 1, 1, 1, 2, 4, 6, 8, 9, 11, 13, 14, 16, 18, 20, 21, 22, - 24, 26, 28, 29, 32, 35, 37, 39, 40, 40, - 40, 41, 42, 43, 43, 44, 45, 45, 45, 46, - 46, 47, 47, 47, 47, 47, 49, 50, 50, 50, - 51, 52, 53, 53, 54, 55, 55 + 24, 26, 28, 29, 30, 33, 36, 38, 40, 41, + 41, 41, 42, 43, 44, 44, 45, 46, 46, 46, + 47, 47, 49, 51, 52, 53, 54, 54, 54, 54, + 56, 57, 57, 57, 58, 59, 59, 60, 61, 61 } ; static yyconst int yy_ec[256] = @@ -350,82 +350,82 @@ static yyconst int yy_meta[22] = 6 } ; -static yyconst short int yy_base[66] = +static yyconst short int yy_base[69] = { 0, - 0, 16, 33, 0, 54, 0, 131, 6, 115, 198, - 113, 198, 74, 198, 198, 0, 0, 12, 4, 198, - 198, 198, 12, 81, 68, 198, 0, 79, 80, 101, - 108, 198, 198, 117, 15, 0, 82, 81, 198, 132, - 11, 94, 77, 70, 0, 102, 0, 82, 106, 107, - 11, 102, 113, 116, 0, 198, 149, 157, 161, 169, - 174, 178, 184, 185, 189 + 0, 16, 33, 0, 54, 0, 131, 6, 128, 198, + 126, 198, 74, 198, 198, 0, 0, 12, 4, 198, + 198, 198, 12, 15, 81, 68, 198, 0, 79, 80, + 101, 126, 198, 198, 117, 18, 0, 120, 81, 198, + 132, 66, 69, 89, 79, 0, 94, 1, 0, 0, + 0, 94, 105, 107, 101, 103, 113, 0, 198, 149, + 157, 161, 169, 174, 178, 182, 188, 189 } ; -static yyconst short int yy_def[66] = +static yyconst short int yy_def[69] = { 0, - 57, 57, 56, 3, 56, 5, 56, 58, 56, 56, - 56, 56, 58, 56, 56, 56, 59, 56, 60, 56, - 56, 56, 56, 56, 61, 56, 62, 58, 58, 58, - 56, 56, 56, 58, 56, 59, 56, 60, 56, 60, - 24, 56, 56, 63, 64, 61, 62, 60, 60, 60, - 65, 56, 56, 56, 64, 0, 56, 56, 56, 56, - 56, 56, 56, 56, 56 + 60, 60, 59, 3, 59, 5, 59, 61, 59, 59, + 59, 59, 61, 59, 59, 59, 62, 59, 63, 59, + 59, 59, 59, 59, 59, 64, 59, 65, 61, 61, + 61, 59, 59, 59, 61, 59, 62, 59, 63, 59, + 63, 25, 64, 66, 42, 45, 59, 67, 68, 43, + 65, 63, 63, 63, 59, 59, 59, 68, 0, 59, + 59, 59, 59, 59, 59, 59, 59, 59 } ; static yyconst short int yy_nxt[220] = { 0, - 56, 9, 10, 11, 56, 12, 56, 29, 39, 29, - 56, 35, 35, 35, 33, 37, 13, 9, 10, 11, - 40, 12, 30, 41, 41, 41, 35, 35, 35, 56, - 44, 56, 13, 14, 9, 10, 11, 14, 14, 14, + 59, 9, 10, 11, 59, 12, 59, 30, 40, 30, + 56, 36, 36, 36, 34, 38, 13, 9, 10, 11, + 41, 12, 31, 42, 43, 43, 44, 44, 44, 36, + 36, 36, 13, 14, 9, 10, 11, 14, 14, 14, 14, 14, 14, 14, 15, 16, 16, 14, 17, 18, 17, 17, 17, 17, 14, 9, 10, 11, 19, 14, - 20, 21, 22, 23, 14, 24, 25, 25, 26, 27, - 18, 27, 27, 27, 27, 29, 33, 34, 42, 53, - 29, 29, 29, 29, 33, 39, 39, 44, 52, 52, - 30, 42, 41, 41, 41, 30, 30, 40, 40, 43, - - 44, 45, 29, 29, 29, 51, 51, 51, 48, 31, - 39, 39, 42, 52, 52, 32, 31, 30, 29, 33, - 29, 44, 40, 40, 54, 54, 54, 54, 54, 54, - 56, 56, 56, 30, 48, 49, 50, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 40, 8, - 8, 8, 8, 8, 8, 8, 8, 28, 56, 28, - 28, 28, 28, 28, 28, 36, 36, 36, 36, 38, - 38, 38, 38, 38, 38, 38, 38, 46, 46, 56, - 56, 46, 47, 47, 47, 47, 54, 56, 54, 55, - 55, 56, 55, 51, 56, 56, 51, 7, 56, 56, - - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56 + 20, 21, 22, 23, 24, 25, 26, 26, 27, 28, + 18, 28, 28, 28, 28, 30, 34, 35, 45, 45, + 30, 30, 30, 30, 59, 40, 59, 48, 48, 59, + 31, 45, 46, 46, 46, 31, 31, 41, 40, 47, + + 48, 49, 30, 30, 30, 55, 55, 52, 48, 40, + 41, 40, 55, 55, 57, 57, 57, 31, 30, 34, + 30, 41, 34, 41, 57, 57, 57, 32, 33, 32, + 59, 59, 59, 31, 52, 53, 54, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 41, 8, + 8, 8, 8, 8, 8, 8, 8, 29, 59, 29, + 29, 29, 29, 29, 29, 37, 37, 37, 37, 39, + 39, 39, 39, 39, 39, 39, 39, 50, 50, 59, + 59, 50, 51, 51, 51, 51, 44, 59, 59, 44, + 57, 59, 57, 58, 58, 59, 58, 7, 59, 59, + + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59 } ; static yyconst short int yy_chk[220] = { 0, 0, 1, 1, 1, 0, 1, 0, 8, 19, 8, - 0, 16, 16, 16, 18, 18, 1, 2, 2, 2, - 19, 2, 8, 23, 23, 23, 35, 35, 35, 41, - 51, 41, 2, 3, 3, 3, 3, 3, 3, 3, + 48, 16, 16, 16, 18, 18, 1, 2, 2, 2, + 19, 2, 8, 23, 23, 23, 24, 24, 24, 36, + 36, 36, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 13, 13, 13, 25, 44, - 28, 29, 28, 29, 37, 38, 48, 25, 43, 43, - 13, 24, 24, 24, 24, 28, 29, 38, 48, 24, - - 24, 24, 30, 30, 30, 42, 42, 42, 49, 31, - 49, 50, 46, 52, 52, 11, 9, 30, 34, 34, - 34, 46, 49, 50, 53, 53, 53, 54, 54, 54, - 7, 0, 0, 34, 40, 40, 40, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 40, 57, - 57, 57, 57, 57, 57, 57, 57, 58, 0, 58, - 58, 58, 58, 58, 58, 59, 59, 59, 59, 60, - 60, 60, 60, 60, 60, 60, 60, 61, 61, 0, - 0, 61, 62, 62, 62, 62, 63, 0, 63, 64, - 64, 0, 64, 65, 0, 0, 65, 56, 56, 56, - - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56 + 5, 5, 5, 5, 5, 13, 13, 13, 26, 43, + 29, 30, 29, 30, 42, 39, 42, 26, 43, 45, + 13, 25, 25, 25, 25, 29, 30, 39, 52, 25, + + 25, 25, 31, 31, 31, 47, 47, 53, 44, 53, + 52, 54, 55, 55, 56, 56, 56, 31, 35, 35, + 35, 53, 38, 54, 57, 57, 57, 32, 11, 9, + 7, 0, 0, 35, 41, 41, 41, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 41, 60, + 60, 60, 60, 60, 60, 60, 60, 61, 0, 61, + 61, 61, 61, 61, 61, 62, 62, 62, 62, 63, + 63, 63, 63, 63, 63, 63, 63, 64, 64, 0, + 0, 64, 65, 65, 65, 65, 66, 0, 0, 66, + 67, 0, 67, 68, 68, 0, 68, 59, 59, 59, + + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -605,7 +605,7 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 27 "kola/kolalexer.l" +#line 29 "kola/kolalexer.l" #line 612 "lex.yy.c" @@ -656,7 +656,7 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 57 ) + if ( yy_current_state >= 60 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -701,17 +701,17 @@ YY_DECL { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 29 "kola/kolalexer.l" +#line 31 "kola/kolalexer.l" {} YY_BREAK case 2: YY_RULE_SETUP -#line 30 "kola/kolalexer.l" +#line 32 "kola/kolalexer.l" {} YY_BREAK case 3: YY_RULE_SETUP -#line 31 "kola/kolalexer.l" +#line 33 "kola/kolalexer.l" { if (YY_START == COMMAND) { yyterminate(); @@ -721,78 +721,78 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 37 "kola/kolalexer.l" +#line 39 "kola/kolalexer.l" {BEGIN COMMAND;} YY_BREAK case 5: YY_RULE_SETUP -#line 38 "kola/kolalexer.l" +#line 40 "kola/kolalexer.l" {BEGIN ARGUMENT; return(CMD);} YY_BREAK case 6: YY_RULE_SETUP -#line 39 "kola/kolalexer.l" +#line 41 "kola/kolalexer.l" {BEGIN ARGUMENT; return(CMD_N);} YY_BREAK case 7: YY_RULE_SETUP -#line 40 "kola/kolalexer.l" +#line 42 "kola/kolalexer.l" {return(TEXT);} YY_BREAK case 8: YY_RULE_SETUP -#line 42 "kola/kolalexer.l" +#line 44 "kola/kolalexer.l" {return(SLP);} YY_BREAK case 9: YY_RULE_SETUP -#line 43 "kola/kolalexer.l" +#line 45 "kola/kolalexer.l" {return(SRP);} YY_BREAK case 10: YY_RULE_SETUP -#line 45 "kola/kolalexer.l" +#line 47 "kola/kolalexer.l" {return(STRING);} YY_BREAK case 11: YY_RULE_SETUP -#line 47 "kola/kolalexer.l" +#line 49 "kola/kolalexer.l" {return(CLN);} YY_BREAK case 12: YY_RULE_SETUP -#line 48 "kola/kolalexer.l" +#line 50 "kola/kolalexer.l" {return(CMA);} YY_BREAK case 13: YY_RULE_SETUP -#line 50 "kola/kolalexer.l" +#line 52 "kola/kolalexer.l" {return(NUM);} YY_BREAK case 14: YY_RULE_SETUP -#line 51 "kola/kolalexer.l" +#line 53 "kola/kolalexer.l" {return(NUM_H);} YY_BREAK case 15: YY_RULE_SETUP -#line 52 "kola/kolalexer.l" +#line 54 "kola/kolalexer.l" {return(NUM_B);} YY_BREAK case 16: YY_RULE_SETUP -#line 53 "kola/kolalexer.l" +#line 55 "kola/kolalexer.l" {return(NUM_F);} YY_BREAK case 17: YY_RULE_SETUP -#line 54 "kola/kolalexer.l" +#line 56 "kola/kolalexer.l" {return(LITERAL);} YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMAND): case YY_STATE_EOF(ARGUMENT): -#line 55 "kola/kolalexer.l" +#line 57 "kola/kolalexer.l" { if (YY_START == COMMAND) { yyterminate(); @@ -802,7 +802,7 @@ case YY_STATE_EOF(ARGUMENT): YY_BREAK case 18: YY_RULE_SETUP -#line 62 "kola/kolalexer.l" +#line 64 "kola/kolalexer.l" ECHO; YY_BREAK #line 809 "lex.yy.c" @@ -1092,7 +1092,7 @@ static yy_state_type yy_get_previous_state() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 57 ) + if ( yy_current_state >= 60 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1122,11 +1122,11 @@ yy_state_type yy_current_state; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 57 ) + if ( yy_current_state >= 60 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 56); + yy_is_jam = (yy_current_state == 59); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; @@ -1687,7 +1687,7 @@ int main() return 0; } #endif -#line 62 "kola/kolalexer.l" +#line 64 "kola/kolalexer.l" int get_stat() { diff --git a/kola/parser.c b/kola/parser.c index 7bd2a5a..a8574ea 100644 --- a/kola/parser.c +++ b/kola/parser.c @@ -2088,7 +2088,7 @@ static struct __pyx_obj_4kola_5lexer_Token *__pyx_f_4kola_6parser_6Parser_pop(st static void __pyx_f_4kola_6parser_6Parser_set_error(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self, struct __pyx_opt_args_4kola_6parser_6Parser_set_error *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_4kola_6parser_6Parser_parse_args(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_4kola_6parser_6Parser_exec_once(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ -static void __pyx_f_4kola_6parser_6Parser_exec_(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static void __pyx_f_4kola_6parser_6Parser_exec(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ @@ -2429,7 +2429,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_2push(struct __pyx_obj_4kola_6pa static PyObject *__pyx_pf_4kola_6parser_6Parser_4pop(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4kola_6parser_6Parser_6parse_args(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4kola_6parser_6Parser_8exec_once(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4kola_6parser_6Parser_10exec_(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4kola_6parser_6Parser_10exec(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4kola_6parser_6Parser_12__iter__(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4kola_6parser_6Parser_14__next__(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4kola_6parser_6Parser_16__repr__(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self); /* proto */ @@ -5143,7 +5143,7 @@ static PyObject *__pyx_f_4kola_6parser_6Parser_exec_once(struct __pyx_obj_4kola_ * kola_set_errcause(KoiLangCommandError, 3, * self.lexer._filename, token.lineno, token.raw_val, e) # <<<<<<<<<<<<<< * - * + * cpdef void exec(self) except *: */ if (unlikely(__pyx_v_token->raw_val == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); @@ -5322,7 +5322,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_8exec_once(struct __pyx_obj_4kol /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("kola.parser.Parser.exec_once", __pyx_clineno, __pyx_lineno, __pyx_filename); + //__Pyx_AddTraceback("kola.parser.Parser.exec_once", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5330,22 +5330,22 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_8exec_once(struct __pyx_obj_4kol return __pyx_r; } -/* "kola/parser.pyx":140 - * +/* "kola/parser.pyx":139 + * self.lexer._filename, token.lineno, token.raw_val, e) * * cpdef void exec(self) except *: # <<<<<<<<<<<<<< * self.exec_once() * while not self.t_cache is None: */ -static PyObject *__pyx_pw_4kola_6parser_6Parser_11exec_(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4kola_6parser_6Parser_11exec(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static void __pyx_f_4kola_6parser_6Parser_exec_(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self, int __pyx_skip_dispatch) { +static void __pyx_f_4kola_6parser_6Parser_exec(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -5367,14 +5367,14 @@ static void __pyx_f_4kola_6parser_6Parser_exec_(struct __pyx_obj_4kola_6parser_P if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_exec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_exec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #ifdef __Pyx_CyFunction_USED if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1) #else if (!PyCFunction_Check(__pyx_t_1) #endif - || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4kola_6parser_6Parser_11exec_)) { + || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4kola_6parser_6Parser_11exec)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -5392,7 +5392,7 @@ static void __pyx_f_4kola_6parser_6Parser_exec_(struct __pyx_obj_4kola_6parser_P PyObject *__pyx_callargs[1] = {__pyx_t_4, }; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -5413,18 +5413,18 @@ static void __pyx_f_4kola_6parser_6Parser_exec_(struct __pyx_obj_4kola_6parser_P #endif } - /* "kola/parser.pyx":141 + /* "kola/parser.pyx":140 * * cpdef void exec(self) except *: * self.exec_once() # <<<<<<<<<<<<<< * while not self.t_cache is None: * self.exec_once() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4kola_6parser_Parser *)__pyx_v_self->__pyx_vtab)->exec_once(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4kola_6parser_Parser *)__pyx_v_self->__pyx_vtab)->exec_once(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "kola/parser.pyx":142 + /* "kola/parser.pyx":141 * cpdef void exec(self) except *: * self.exec_once() * while not self.t_cache is None: # <<<<<<<<<<<<<< @@ -5436,20 +5436,20 @@ static void __pyx_f_4kola_6parser_6Parser_exec_(struct __pyx_obj_4kola_6parser_P __pyx_t_7 = (__pyx_t_6 != 0); if (!__pyx_t_7) break; - /* "kola/parser.pyx":143 + /* "kola/parser.pyx":142 * self.exec_once() * while not self.t_cache is None: * self.exec_once() # <<<<<<<<<<<<<< * * def __iter__(self): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4kola_6parser_Parser *)__pyx_v_self->__pyx_vtab)->exec_once(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4kola_6parser_Parser *)__pyx_v_self->__pyx_vtab)->exec_once(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "kola/parser.pyx":140 - * + /* "kola/parser.pyx":139 + * self.lexer._filename, token.lineno, token.raw_val, e) * * cpdef void exec(self) except *: # <<<<<<<<<<<<<< * self.exec_once() @@ -5469,15 +5469,15 @@ static void __pyx_f_4kola_6parser_6Parser_exec_(struct __pyx_obj_4kola_6parser_P } /* Python wrapper */ -static PyObject *__pyx_pw_4kola_6parser_6Parser_11exec_(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4kola_6parser_6Parser_11exec(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_4kola_6parser_6Parser_11exec_ = {"exec", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kola_6parser_6Parser_11exec_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_4kola_6parser_6Parser_11exec_(PyObject *__pyx_v_self, +static PyMethodDef __pyx_mdef_4kola_6parser_6Parser_11exec = {"exec", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kola_6parser_6Parser_11exec, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_4kola_6parser_6Parser_11exec(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -5494,14 +5494,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("exec", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "exec", 0))) return NULL; - __pyx_r = __pyx_pf_4kola_6parser_6Parser_10exec_(((struct __pyx_obj_4kola_6parser_Parser *)__pyx_v_self)); + __pyx_r = __pyx_pf_4kola_6parser_6Parser_10exec(((struct __pyx_obj_4kola_6parser_Parser *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4kola_6parser_6Parser_10exec_(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self) { +static PyObject *__pyx_pf_4kola_6parser_6Parser_10exec(struct __pyx_obj_4kola_6parser_Parser *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -5510,8 +5510,8 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_10exec_(struct __pyx_obj_4kola_6 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exec", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_4kola_6parser_6Parser_exec_(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_f_4kola_6parser_6Parser_exec(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5528,7 +5528,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_10exec_(struct __pyx_obj_4kola_6 return __pyx_r; } -/* "kola/parser.pyx":145 +/* "kola/parser.pyx":144 * self.exec_once() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -5555,7 +5555,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_12__iter__(struct __pyx_obj_4kol __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "kola/parser.pyx":146 + /* "kola/parser.pyx":145 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -5567,7 +5567,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_12__iter__(struct __pyx_obj_4kol __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "kola/parser.pyx":145 + /* "kola/parser.pyx":144 * self.exec_once() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -5582,7 +5582,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_12__iter__(struct __pyx_obj_4kol return __pyx_r; } -/* "kola/parser.pyx":148 +/* "kola/parser.pyx":147 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -5615,19 +5615,19 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_14__next__(struct __pyx_obj_4kol int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); - /* "kola/parser.pyx":149 + /* "kola/parser.pyx":148 * * def __next__(self): * ret = self.exec_once() # <<<<<<<<<<<<<< * if self.stat == 255: * raise StopIteration */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4kola_6parser_Parser *)__pyx_v_self->__pyx_vtab)->exec_once(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4kola_6parser_Parser *)__pyx_v_self->__pyx_vtab)->exec_once(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* "kola/parser.pyx":150 + /* "kola/parser.pyx":149 * def __next__(self): * ret = self.exec_once() * if self.stat == 255: # <<<<<<<<<<<<<< @@ -5637,7 +5637,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_14__next__(struct __pyx_obj_4kol __pyx_t_2 = ((__pyx_v_self->stat == 0xFF) != 0); if (unlikely(__pyx_t_2)) { - /* "kola/parser.pyx":151 + /* "kola/parser.pyx":150 * ret = self.exec_once() * if self.stat == 255: * raise StopIteration # <<<<<<<<<<<<<< @@ -5645,9 +5645,9 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_14__next__(struct __pyx_obj_4kol * */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 151, __pyx_L1_error) + __PYX_ERR(0, 150, __pyx_L1_error) - /* "kola/parser.pyx":150 + /* "kola/parser.pyx":149 * def __next__(self): * ret = self.exec_once() * if self.stat == 255: # <<<<<<<<<<<<<< @@ -5656,7 +5656,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_14__next__(struct __pyx_obj_4kol */ } - /* "kola/parser.pyx":152 + /* "kola/parser.pyx":151 * if self.stat == 255: * raise StopIteration * return ret # <<<<<<<<<<<<<< @@ -5668,7 +5668,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_14__next__(struct __pyx_obj_4kol __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "kola/parser.pyx":148 + /* "kola/parser.pyx":147 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -5688,7 +5688,7 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_14__next__(struct __pyx_obj_4kol return __pyx_r; } -/* "kola/parser.pyx":154 +/* "kola/parser.pyx":153 * return ret * * def __repr__(self): # <<<<<<<<<<<<<< @@ -5718,19 +5718,19 @@ static PyObject *__pyx_pf_4kola_6parser_6Parser_16__repr__(struct __pyx_obj_4kol int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "kola/parser.pyx":155 + /* "kola/parser.pyx":154 * * def __repr__(self): * return PyUnicode_FromFormat("", self.lexer._filename) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyUnicode_FromFormat(((char const *)""), __pyx_v_self->lexer->_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_1 = PyUnicode_FromFormat(((char const *)""), __pyx_v_self->lexer->_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "kola/parser.pyx":154 + /* "kola/parser.pyx":153 * return ret * * def __repr__(self): # <<<<<<<<<<<<<< @@ -7346,7 +7346,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 127, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 150, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -7399,14 +7399,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kola_parser_pyx, __pyx_n_s_exec_once, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 99, __pyx_L1_error) - /* "kola/parser.pyx":140 - * + /* "kola/parser.pyx":139 + * self.lexer._filename, token.lineno, token.raw_val, e) * * cpdef void exec(self) except *: # <<<<<<<<<<<<<< * self.exec_once() * while not self.t_cache is None: */ - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kola_parser_pyx, __pyx_n_s_exec, 140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_kola_parser_pyx, __pyx_n_s_exec, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 139, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -7572,7 +7572,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4kola_6parser_Parser.set_error = (void (*)(struct __pyx_obj_4kola_6parser_Parser *, struct __pyx_opt_args_4kola_6parser_6Parser_set_error *__pyx_optional_args))__pyx_f_4kola_6parser_6Parser_set_error; __pyx_vtable_4kola_6parser_Parser.parse_args = (PyObject *(*)(struct __pyx_obj_4kola_6parser_Parser *, int __pyx_skip_dispatch))__pyx_f_4kola_6parser_6Parser_parse_args; __pyx_vtable_4kola_6parser_Parser.exec_once = (PyObject *(*)(struct __pyx_obj_4kola_6parser_Parser *, int __pyx_skip_dispatch))__pyx_f_4kola_6parser_6Parser_exec_once; - __pyx_vtable_4kola_6parser_Parser.exec = (void (*)(struct __pyx_obj_4kola_6parser_Parser *, int __pyx_skip_dispatch))__pyx_f_4kola_6parser_6Parser_exec_; + __pyx_vtable_4kola_6parser_Parser.exec = (void (*)(struct __pyx_obj_4kola_6parser_Parser *, int __pyx_skip_dispatch))__pyx_f_4kola_6parser_6Parser_exec; #if CYTHON_USE_TYPE_SPECS __pyx_ptype_4kola_6parser_Parser = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4kola_6parser_Parser_spec, NULL); if (unlikely(!__pyx_ptype_4kola_6parser_Parser)) __PYX_ERR(0, 4, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4kola_6parser_Parser_spec, __pyx_ptype_4kola_6parser_Parser) < 0) __PYX_ERR(0, 4, __pyx_L1_error) @@ -8039,16 +8039,16 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_4kola_6parser_Parser); - /* "kola/parser.pyx":140 - * + /* "kola/parser.pyx":139 + * self.lexer._filename, token.lineno, token.raw_val, e) * * cpdef void exec(self) except *: # <<<<<<<<<<<<<< * self.exec_once() * while not self.t_cache is None: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4kola_6parser_6Parser_11exec_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_exec, NULL, __pyx_n_s_kola_parser, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4kola_6parser_6Parser_11exec, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_exec, NULL, __pyx_n_s_kola_parser, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4kola_6parser_Parser->tp_dict, __pyx_n_s_exec, __pyx_t_3) < 0) __PYX_ERR(0, 140, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4kola_6parser_Parser->tp_dict, __pyx_n_s_exec, __pyx_t_3) < 0) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_4kola_6parser_Parser); diff --git a/kola/version.py b/kola/version.py index 340210e..3af2b01 100644 --- a/kola/version.py +++ b/kola/version.py @@ -1,2 +1,2 @@ -__version__ = "0.1.0" -version_info = (0, 1, 0, "final", 0) \ No newline at end of file +__version__ = "0.1.1" +version_info = (0, 1, 1, "final", 0) \ No newline at end of file