1 %{ // -*-Fundamental-*-
4 parser.yy -- Bison/C++ parser for mudela
6 source file of the GNU LilyPond music typesetter
8 (c) 1997 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 Jan Nieuwenhuizen <janneke@gnu.org>
13 #include "lily-guile.hh"
14 #include "notename-table.hh"
16 #include "translation-property.hh"
17 #include "script-def.hh"
18 #include "symtable.hh"
20 #include "ps-lookup.hh"
21 #include "tex-lookup.hh"
23 #include "my-lily-lexer.hh"
24 #include "paper-def.hh"
25 #include "midi-def.hh"
27 #include "file-path.hh"
30 #include "parseconstruct.hh"
31 #include "dimensions.hh"
32 #include "identifier.hh"
33 #include "command-request.hh"
34 #include "musical-request.hh"
35 #include "my-lily-parser.hh"
36 #include "text-def.hh"
37 #include "translator-group.hh"
39 #include "music-list.hh"
40 #include "duration-convert.hh"
41 #include "change-translator.hh"
42 #include "file-results.hh"
43 #include "mudela-version.hh"
45 #include "relative-music.hh"
46 #include "transposed-music.hh"
47 #include "compressed-music.hh"
50 Mudela_version oldest_version ("1.0.7");
51 Mudela_version version ("1.0.8");
54 // needed for bison.simple's malloc() and free()
57 int const GUESS_PLET = 5;
58 int guess_plet_a[GUESS_PLET] =
78 Assignment (Assignment const&s)
80 name_p_ = new String (*s.name_p_);
81 id_p_ = s.id_p_->clone ();
85 Paper_def* current_paper = 0;
91 #define YYERROR_VERBOSE 1
93 #define YYPARSE_PARAM my_lily_parser_l
94 #define YYLEX_PARAM my_lily_parser_l
95 #define THIS ((My_lily_parser *) my_lily_parser_l)
97 #define yyerror THIS->parser_error
98 #define ARRAY_SIZE(a,s) if (a.size () != s) THIS->parser_error (_f("expecting %d arguments", s))
105 Array<Interval>* intarr;
106 Array<Musical_pitch> *pitch_arr;
107 Array<String> * strvec;
110 Simultaneous_music *chord;
115 Music_list *music_list;
120 Music_output_def * outputdef;
121 Musical_pitch * pitch;
125 Notename_table *notenametab;
129 General_script_def * script;
134 Symtables* symtables;
146 yylex (YYSTYPE *s, void * v_l)
148 My_lily_parser *pars_l = (My_lily_parser*) v_l;
149 My_lily_lexer * lex_l = pars_l->lexer_p_;
151 lex_l->lexval_l = (void*) s;
152 return lex_l->yylex ();
160 /* tokens which are not keywords */
199 %token SCHEME /* token vs typedef; can't be named SCM */
217 %token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR
221 %token <pitch> NOTENAME_PITCH
222 %token <id> DURATION_IDENTIFIER
223 %token <id> IDENTIFIER
224 %token <id> NOTENAME_TABLE_IDENTIFIER
225 %token <id> MUSIC_IDENTIFIER
226 %token <id> POST_REQUEST_IDENTIFIER
227 %token <id> SCRIPT_IDENTIFIER
228 %token <id> COMMAND_IDENTIFIER
229 %token <id> REAL_IDENTIFIER
230 %token <id> STRING_IDENTIFIER
231 %token <id> TRANS_IDENTIFIER
232 %token <id> INT_IDENTIFIER
233 %token <id> SCORE_IDENTIFIER
234 %token <id> MIDI_IDENTIFIER
235 %token <id> PAPER_IDENTIFIER
236 %token <id> REQUEST_IDENTIFIER
238 %token <string> DURATION RESTNAME
239 %token <string> STRING
243 %type <outputdef> output_def
244 %type <scope> mudela_header mudela_header_body
246 %type <i> open_request_parens close_request_parens
247 %type <i> open_abbrev_parens
248 %type <i> open_plet_parens close_plet_parens
249 %type <i> sub_quotes sup_quotes
250 %type <music> simple_element request_chord command_element Simple_music Composite_music
251 %type <i> abbrev_type
252 %type <i> int unsigned
254 %type <id> identifier_init simple_identifier_init block_identifier
255 %type <duration> steno_duration notemode_duration
256 %type <duration> entered_notemode_duration explicit_duration
257 %type <interval> dinterval
258 %type <intvec> intastint_list int_list
259 %type <symtables> symtables symtables_body
261 %type <pitch> explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch
262 %type <notereq> steno_notepitch
263 %type <pitch_arr> pitch_list
264 %type <midi> midi_block midi_body
265 %type <duration> duration_length
267 %type <scalar> scalar
268 %type <music> Music relative_music Sequential_music Simultaneous_music
269 %type <music> property_def translator_change
270 %type <music_list> Music_list
271 %type <paper> paper_block paper_def_body
272 %type <real> real_expression real dimension
273 %type <request> abbrev_command_req
274 %type <request> post_request structured_post_request
275 %type <pair> plet_fraction
276 %type <request> command_req verbose_command_req
277 %type <request> script_req dynamic_req
278 %type <string> string
279 %type <score> score_block score_body
280 %type <intarr> shape_array
281 %type <script> script_definition script_body mudela_script gen_script_def
282 %type <textdef> text_def finger
283 %type <string> script_abbreviation
284 %type <symbol> symboldef
285 %type <symtable> symtable symtable_body
286 %type <trans> translator_spec translator_spec_body
287 %type <tempo> tempo_request
288 %type <notenametab> notenames_body notenames_block
299 | mudela toplevel_expression {}
300 | mudela assignment { }
302 | mudela check_version { }
307 THIS->lexer_p_->set_notename_table ($1);
310 delete header_global_p;
311 header_global_p = $1;
314 score_global_array.push ($1);
317 Identifier * id = new
318 Paper_def_identifier ($1, PAPER_IDENTIFIER);
319 THIS->lexer_p_->set_identifier ("$defaultpaper", id)
322 Identifier * id = new
323 Midi_def_identifier ($1, MIDI_IDENTIFIER);
324 THIS->lexer_p_->set_identifier ("$defaultmidi", id)
333 gh_eval_str ($2->ch_C ());
340 Mudela_version ver (*$2);
341 if (!((ver >= oldest_version) && (ver <= version))) {
342 if (THIS->ignore_version_b_) {
343 THIS->here_input ().error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ()));
345 THIS->fatal_error_i_ = 1;
346 THIS->parser_error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ()));
354 NOTENAMES '{' notenames_body '}' { $$ = $3; }
361 $$ = new Notename_table;
363 | NOTENAME_TABLE_IDENTIFIER {
364 $$ = $1-> access_Notename_table(true);
366 | notenames_body STRING '=' explicit_musical_pitch {
377 THIS->lexer_p_-> scope_l_arr_.push ($$);
379 | mudela_header_body assignment ';' {
385 HEADER '{' mudela_header_body '}' {
387 THIS->lexer_p_-> scope_l_arr_.pop ();
397 THIS->remember_spot ();
399 /* cont */ '=' identifier_init {
400 THIS->lexer_p_->set_identifier (*$1, $4);
401 $4->init_b_ = THIS->init_parse_b_;
402 $4->set_spot (THIS->pop_spot ());
407 simple_identifier_init: identifier_init
416 $$ = new Score_identifier ($1, SCORE_IDENTIFIER);
420 $$ = new Notename_table_identifier ($1, NOTENAME_TABLE_IDENTIFIER);
423 $$ = new Paper_def_identifier ($1, PAPER_IDENTIFIER);
426 $$ = new Midi_def_identifier ($1, MIDI_IDENTIFIER);
430 $$ = new Symtables_identifier ($1, IDENTIFIER);
433 $$ = new Translator_identifier ($1, TRANS_IDENTIFIER);
436 $$ = new Music_identifier ($1, MUSIC_IDENTIFIER);
440 $$ = new Request_identifier ($1, POST_REQUEST_IDENTIFIER);
442 | explicit_duration {
443 $$ = new Duration_identifier ($1, DURATION_IDENTIFIER);
446 $$ = new Real_identifier (new Real ($1), REAL_IDENTIFIER);
449 $$ = new String_identifier ($1, STRING_IDENTIFIER);
452 $$ = new int_identifier (new int ($1), INT_IDENTIFIER);
454 | script_definition {
455 $$ = new General_script_def_identifier ($1, SCRIPT_IDENTIFIER);
461 TRANSLATOR '{' translator_spec_body '}'
465 translator_spec_body:
467 $$ = $1->access_Translator (true);
468 $$-> set_spot (THIS->here_input ());
471 Translator* t = get_translator_l (*$2);
472 Translator_group * tg = t->access_Translator_group ();
475 THIS->parser_error (_("Need a translator group for a context"));
478 t->set_spot (THIS->here_input ());
482 | translator_spec_body STRING '=' simple_identifier_init ';' {
484 String_identifier *s = id->access_String_identifier ();
485 Real_identifier *r= id->access_Real_identifier ();
486 int_identifier *i = id->access_int_identifier ();
489 if (s) str = *s->access_String (false);
490 if (i) str = to_str (*i->access_int (false));
491 if (r) str = to_str (*r->access_Real (false));
493 THIS->parser_error (_("Wrong type for property value"));
496 $$->set_property (*$2, str);
498 | translator_spec_body NAME STRING ';' {
502 | translator_spec_body CONSISTS STRING ';' {
503 $$->access_Translator_group ()-> set_element (*$3, true);
506 | translator_spec_body ACCEPTS STRING ';' {
507 $$->access_Translator_group ()-> set_acceptor (*$3, true);
510 | translator_spec_body REMOVE STRING ';' {
511 $$->access_Translator_group ()-> set_element (*$3, false);
520 SCORE { THIS->remember_spot ();
521 THIS->error_level_i_ =0;
523 /*cont*/ '{' score_body '}' {
525 $$->set_spot (THIS->pop_spot ());
526 if (!$$->def_p_arr_.size ())
527 $$->add_output (THIS->default_paper_p ());
529 /* handle error levels. */
530 $$->errorlevel_i_ = THIS->error_level_i_;
531 THIS->error_level_i_ = 0;
539 $$ = $1->access_Score (true);
541 | score_body mudela_header {
546 $2->warning (_ ("More than one music block"));
549 | score_body output_def {
567 /* */ { $$ =new Array<int>; }
568 | intastint_list int '*' int {
569 $$->push ($2); $$->push ($4);
571 | intastint_list int {
572 $$->push ($2); $$->push (1);
581 PAPER '{' paper_def_body '}' {
583 THIS-> lexer_p_->scope_l_arr_.pop ();
594 Paper_def *p = THIS->default_paper_p ();
595 THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_);
598 | PAPER_IDENTIFIER optional_semicolon {
599 Paper_def *p = $1->access_Paper_def (true);
600 THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
603 | paper_def_body int '=' symtables { // ugh, what a syntax
604 Lookup * l = global_lookup_l->lookup_p (*$4);
605 $$->set_lookup ($2, l);
607 | paper_def_body assignment ';' {
610 | paper_def_body translator_spec {
611 $$->assign_translator ($2);
613 | paper_def_body SHAPE '=' shape_array ';' {
614 $$->shape_int_a_ = *$4;
617 | paper_def_body error {
624 real_expression { $$ = $1; }
649 $$= *$1->access_Real (false);
651 | '-' real_expression %prec UNARY_MINUS {
654 | real_expression '*' real_expression {
657 | real_expression '/' real_expression {
660 | real_expression '+' real_expression {
663 | real_expression '-' real_expression {
666 | '(' real_expression ')' {
674 $$ = new Array<Interval>;
676 | shape_array real real {
677 $$->push(Interval($2, $2 + $3));
686 '{' midi_body '}' { $$ = $3; }
689 midi_body: /* empty */ {
690 $$ = THIS->default_midi_p ();
693 $$ = $1-> access_Midi_def (true);
695 | midi_body translator_spec {
696 $$-> assign_translator ($2);
698 | midi_body tempo_request ';' {
699 $$->set_tempo ($2->dur_.length (), $2->metronome_i_);
708 TEMPO entered_notemode_duration '=' unsigned {
712 $$-> metronome_i_ = $4;
716 Music_list: /* empty */ {
732 Sequential_music: '{' Music_list '}' {
733 $$ = new Sequential_music ($2);
737 Simultaneous_music: '<' Music_list '>' {
738 $$ = new Simultaneous_music ($2);
743 request_chord { $$ = $1; }
744 | MUSIC_IDENTIFIER { $$ = $1->access_Music (true); }
753 $$->translator_type_str_ = *$2;
756 | TYPE STRING '=' STRING Music {
758 $$->translator_type_str_ = *$2;
759 $$->translator_id_str_ = *$4;
763 | TIMES int '/' int Music {
764 $$ = new Compressed_music ($2, $4, $5);
767 | Simultaneous_music { $$ = $1; }
768 | Sequential_music { $$ = $1; }
769 | TRANSPOSE musical_pitch Music {
770 $$ = new Transposed_music ($3, *$2);
774 { THIS->lexer_p_->push_note_state (); }
777 THIS->lexer_p_->pop_state ();
781 { THIS->lexer_p_->push_lyric_state (); }
785 THIS->lexer_p_->pop_state ();
787 | relative_music { $$ = $1; }
791 RELATIVE absolute_musical_pitch Music {
792 $$ = new Relative_octave_music ($3, *$2);
798 TRANSLATOR STRING '=' STRING {
799 Change_translator * t = new Change_translator;
800 t-> change_to_type_str_ = *$2;
801 t-> change_to_id_str_ = *$4;
804 $$->set_spot (THIS->here_input ());
811 PROPERTY STRING '.' STRING '=' scalar {
812 Translation_property *t = new Translation_property;
813 t-> translator_type_str_ = *$2;
817 $$->set_spot (THIS->here_input ());
825 STRING { $$ = new Scalar (*$1); delete $1; }
826 | int { $$ = new Scalar ($1); }
831 pre_requests simple_element post_requests {
832 THIS->add_requests ((Simultaneous_music*)$2);//ugh
840 $$ = new Request_chord;
841 $$-> set_spot (THIS->here_input ());
842 $1-> set_spot (THIS->here_input ());
843 ((Simultaneous_music*)$$) ->add_music ($1);//ugh
849 | verbose_command_req ';' { $$ = $1; }
854 $$ = new Barcheck_req;
856 | COMMAND_IDENTIFIER {
857 $$ = $1->access_Request (true);
862 $$->spantype = Span_req::START;
866 $$->spantype = Span_req::STOP;
874 $$ = new Bar_req (*$2);
878 $$ = new Mark_req (*$2);
882 $$ = new Mark_req (to_str ($2));
884 | TIME_T unsigned '/' unsigned {
885 Time_signature_change_req *m = new Time_signature_change_req;
891 Break_req * b = new Break_req;
893 b-> set_spot (THIS->here_input ());
896 | SKIP duration_length {
897 Skip_req * skip_p = new Skip_req;
898 skip_p->duration_ = *$2;
906 $$ = new Cadenza_req ($2);
908 | PARTIAL duration_length {
909 $$ = new Partial_measure_req ($2->length ());
913 $$ = new Clef_change_req (*$2);
916 | KEY NOTENAME_PITCH {
917 Key_change_req *key_p= new Key_change_req;
918 key_p->pitch_arr_.push(*$2);
919 key_p->ordinary_key_b_ = true;
923 | KEYSIGNATURE pitch_list {
924 Key_change_req *key_p= new Key_change_req;
925 key_p->pitch_arr_ = *$2;
926 key_p->ordinary_key_b_ = false;
930 | GROUPING intastint_list {
931 $$ = get_grouping_req (*$2); delete $2;
937 /* something silly happened. Junk this stuff*/
938 if (!THIS->post_reqs.empty ())
940 warning ("Junking post-requests");
941 THIS->post_reqs.clear ();
944 | post_requests structured_post_request {
945 $2->set_spot (THIS->here_input ());
946 THIS->post_reqs.push ($2);
948 | post_requests close_request_parens {
949 Array<Request*>& r = *THIS->get_parens_request ($2);
950 for (int i = 0; i < r.size (); i++ )
951 r[i]->set_spot (THIS->here_input ());
952 THIS->post_reqs.concat (r);
957 structured_post_request:
963 POST_REQUEST_IDENTIFIER {
964 $$ = (Request*)$1->access_Request (true);
970 Abbreviation_req* a = new Abbreviation_req;
997 | NOTENAME_PITCH sup_quotes {
1001 | NOTENAME_PITCH sub_quotes {
1003 $$->octave_i_ += - $2;
1007 explicit_musical_pitch:
1008 MUSICAL_PITCH '{' int_list '}' {/* ugh */
1009 Array<int> &a = *$3;
1011 $$ = new Musical_pitch;
1012 $$->octave_i_ = a[0];
1013 $$->notename_i_ = a[1];
1014 $$->accidental_i_ = a[2];
1021 | explicit_musical_pitch
1031 | steno_notepitch '!' {
1032 $$->forceacc_b_ = ! $$->forceacc_b_;
1038 DURATION '{' int_list '}' {
1040 Array<int> &a = *$3;
1043 $$-> durlog_i_ = a[0];
1044 $$-> dots_i_ = a[1];
1051 ABSDYNAMIC '{' unsigned '}' {
1052 Absolute_dynamic_req *ad_p = new Absolute_dynamic_req;
1053 ad_p ->loudness_ = (Dynamic_req::Loudness)$3;
1056 | SPANDYNAMIC '{' int int '}' {
1057 Span_dynamic_req * sp_p = new Span_dynamic_req;
1058 sp_p->spantype = (Span_req::Spantype)$4;
1059 sp_p-> dynamic_dir_ = (Direction)$3;
1065 unsigned '/' unsigned {
1072 $$[0] = guess_plet_a[(num <? GUESS_PLET) - 1];
1080 THIS->plet_.type_i_ = $2[1];
1081 THIS->plet_.iso_i_ = $2[0];
1082 THIS->default_duration_.plet_ = THIS->plet_;
1086 THIS->plet_.type_i_ = 1;
1087 THIS->plet_.iso_i_ = 1;
1088 THIS->default_duration_.plet_ = THIS->plet_;
1090 | TELP plet_fraction {
1092 THIS->plet_.type_i_ = $2[1];
1093 THIS->plet_.iso_i_ = $2[0];
1094 THIS->default_duration_.plet_ = THIS->plet_;
1098 close_request_parens:
1120 if (!Duration::duration_type_b ($3))
1121 THIS->parser_error (_f ("not a duration: %d", $3));
1123 THIS->parser_error (_ ("can't abbreviate"));
1125 THIS->set_abbrev_beam ($3);
1132 THIS->plet_.type_i_ = $2[1];
1133 THIS->plet_.iso_i_ = $2[0];
1134 THIS->default_duration_.plet_ = THIS->plet_;
1136 | PLET plet_fraction {
1138 THIS->plet_.type_i_ = $2[1];
1139 THIS->plet_.iso_i_ = $2[0];
1140 THIS->default_duration_.plet_ = THIS->plet_;
1144 open_request_parens:
1154 | open_abbrev_parens
1161 SCRIPT '{' script_body '}' { $$ = $3; }
1165 STRING int int int int int {
1166 Script_def *s = new Script_def;
1167 s->set_from_input (*$1,$2, $3,$4,$5, $6);
1174 script_dir gen_script_def {
1175 Musical_script_req *m = new Musical_script_req;
1177 m->scriptdef_p_ = $2;
1178 m->set_spot (THIS->here_input ());
1180 m->dir_ = (Direction)$1;
1187 ((Text_def*) $$)->align_dir_ = LEFT; /* UGH */
1191 $$-> set_spot (THIS->here_input ());
1195 ((Text_def*)$$)->align_dir_ = RIGHT; /* UGH */
1201 Text_def *t = new Text_def;
1205 $$->set_spot (THIS->here_input ());
1211 Text_def* t = new Text_def;
1213 t->text_str_ = to_str ($1);
1214 t->style_str_ = "finger";
1215 $$->set_spot (THIS->here_input ());
1219 script_abbreviation:
1220 '^' { $$ = get_scriptdef ('^'); }
1221 | '+' { $$ = get_scriptdef ('+'); }
1222 | '-' { $$ = get_scriptdef ('-'); }
1223 | '|' { $$ = get_scriptdef ('|'); }
1224 | 'o' { $$ = get_scriptdef ('o'); }
1225 | '>' { $$ = get_scriptdef ('>'); }
1227 $$ = get_scriptdef ('.');
1232 SCRIPT_IDENTIFIER { $$ = $1->access_General_script_def (true); }
1233 | script_definition { $$ = $1; }
1234 | script_abbreviation {
1235 $$ = THIS->lexer_p_->lookup_identifier (*$1)->access_General_script_def (true);
1249 | pre_requests open_request_parens {
1250 Array<Request*>& r = *THIS->get_parens_request ($2);
1251 for (int i = 0; i < r.size (); i++ )
1252 r[i]->set_spot (THIS->here_input ());
1253 THIS->pre_reqs.concat (r);
1258 absolute_musical_pitch:
1259 steno_musical_pitch {
1272 | dots '.' { $$ ++; }
1275 entered_notemode_duration:
1277 $$ = new Duration (THIS->default_duration_);
1280 $$ = new Duration (THIS->default_duration_);
1284 THIS->set_last_duration ($1);
1289 entered_notemode_duration {
1297 if (!Duration::duration_type_b ($1))
1298 THIS->parser_error (_f ("not a duration: %d", $1));
1300 $$->durlog_i_ = Duration_convert::i2_type ($1);
1301 $$->set_plet (THIS->plet_.iso_i_, THIS->plet_.type_i_);
1304 | DURATION_IDENTIFIER {
1305 $$ = $1->access_Duration (true);
1307 | steno_duration '.' {
1310 | steno_duration '*' unsigned {
1311 $$->plet_.iso_i_ *= $3;
1313 | steno_duration '/' unsigned {
1314 $$->plet_.type_i_ *= $3;
1324 if (!Duration::duration_type_b ($2))
1325 THIS->parser_error (_f ("not a duration: %d", $2));
1327 THIS->parser_error (_ ("can't abbreviate"));
1335 steno_notepitch notemode_duration {
1336 if (!THIS->lexer_p_->note_state_b ())
1337 THIS->parser_error (_ ("have to be in Note mode for notes"));
1338 $1->duration_ = *$2;
1339 $$ = THIS->get_note_element ($1, $2);
1341 | RESTNAME notemode_duration {
1342 $$ = THIS->get_rest_element (*$1, $2);
1343 delete $1; // delete notename
1345 | MEASURES notemode_duration {
1346 Multi_measure_rest_req* m = new Multi_measure_rest_req;
1350 Simultaneous_music*velt_p = new Request_chord;
1351 velt_p->set_spot (THIS->here_input ());
1352 velt_p->add_music (m);
1355 | STRING notemode_duration {
1356 if (!THIS->lexer_p_->lyric_state_b ())
1357 THIS->parser_error (_ ("have to be in Lyric mode for lyrics"));
1358 $$ = THIS->get_word_element (*$1, $2);
1368 $$ = new Array<Musical_pitch>;
1370 | pitch_list musical_pitch {
1402 $$ = *$1->access_int (false);
1411 | STRING_IDENTIFIER {
1412 $$ = $1->access_String (true);
1414 | string '+' string {
1426 SYMBOLTABLES '{' symtables_body '}' { $$ = $3; }
1434 $$ = $1->access_Symtables (true);
1436 | symtables_body FONT STRING {
1438 $$->font_path_ = global_path.find (*$3);
1439 if (!$$->font_path_.length_i ())
1440 THIS->here_input ().error (_f("can't open file: `%s'", $3->ch_C()));
1444 | symtables_body STRING '=' symtable {
1451 TABLE '{' symtable_body '}' { $$ = $3; }
1455 { $$ = new Symtable; }
1456 | symtable_body STRING symboldef {
1464 STRING unsigned box {
1465 $$ = global_lookup_l->atom_p (*$1, $2, *$3);
1470 Box b (Interval (0,0), Interval (0,0));
1471 $$ = global_lookup_l->atom_p (*$1, $2, b);
1477 dinterval dinterval {
1478 $$ = new Box (*$1, *$2);
1484 dinterval: real real {
1485 $$ = new Interval ($1, $2);
1492 My_lily_parser::set_yydebug (bool b)
1499 My_lily_parser::do_yyparse ()
1501 yyparse ((void*)this);