]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/my-lily-parser.hh
patch::: 1.1.15.jcn1: pats
[lilypond.git] / lily / include / my-lily-parser.hh
1 /*
2   my-lily-parser.hh -- declare My_lily_parser
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef MY_LILY_PARSER_HH
11 #define MY_LILY_PARSER_HH
12 #include "lily-proto.hh"
13 #include "string.hh"
14 #include "array.hh"
15 #include "lily-proto.hh"
16 #include "lily-proto.hh"
17 #include "duration.hh"
18 #include "string.hh"
19 #include "array.hh"
20 #include "input.hh"
21
22 class My_lily_parser 
23 {
24 public:
25   My_lily_parser (Sources * sources_l);
26   ~My_lily_parser();
27
28   void do_init_file();
29   void parse_file ( String init_str, String file_str);
30   void set_version_check (bool ignore);
31
32 public:
33   int abbrev_beam_type_i_;
34   int default_abbrev_i_;
35   Duration default_duration_;
36   Extender_req* extender_req;
37   Scope *default_header_p_;
38     
39   bool first_b_;
40
41   Array<Request*> pre_reqs, post_reqs;
42   int fatal_error_i_;
43   Sources * source_l_;
44   int error_level_i_;
45   bool init_parse_b_;
46   My_lily_lexer * lexer_p_;
47  
48   Input here_input() const;
49   void remember_spot();
50   Input pop_spot();
51     
52   Paper_def*default_paper_p();
53   Midi_def*default_midi_p();
54   void do_yyparse();
55   void parser_error (String);
56
57   Array<Request*>* get_parens_request (int t);
58     
59   void set_debug();
60   void set_yydebug (bool);
61   bool ignore_version_b_;
62
63 private:
64   char const* here_ch_C() const;
65   Array<Input> define_spot_array_;
66   String init_str_;
67
68   void add_requests (Simultaneous_music*v);
69
70   Simultaneous_music * get_note_element (Note_req * ,Duration *);
71   Simultaneous_music * get_chord (Musical_pitch, Array<Musical_pitch>*, Array<Musical_pitch>*, Musical_pitch*, Duration);
72   Simultaneous_music* get_rest_element (String, Duration *);
73   Simultaneous_music* get_word_element (String, Duration*);
74   Melodic_req* get_melodic_req (Melodic_req* melodic, int quotes);
75   String notename_str (Melodic_req* melodic);
76   void set_last_duration (Duration const *);
77   void set_abbrev_beam (int type_i);
78   friend int yyparse (void*);
79 };
80
81 #endif // MY_LILY_PARSER_HH