]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/my-lily-parser.hh
0dd977dca95f2dfafd44efaecba3168acbe02c5a
[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@stack.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 "varray.hh"
15 #include "lily-proto.hh"
16 #include "lily-proto.hh"
17 #include "duration.hh"
18 #include "string.hh"
19 #include "varray.hh"
20 #include "input.hh"
21
22 class My_lily_parser {
23   char const* here_ch_C() const;
24   Array<Input> define_spot_array_;
25   String init_str_;
26
27   void add_requests (Chord*v);
28
29   Chord * get_note_element (Note_req * ,Duration *);
30   Chord* get_rest_element (String,Duration *);
31   Chord* get_word_element (Text_def*, Duration*);
32   Melodic_req* get_melodic_req (Melodic_req* melodic, int quotes);
33   String notename_str (Melodic_req* melodic);
34   void set_last_duration (Duration const *);
35   void set_abbrev_beam (int type_i);
36   friend int yyparse (void*);
37
38 public:
39   int abbrev_beam_type_i_;
40   int default_octave_i_;
41   Duration default_duration_;
42   Plet plet_;
43   Header *default_header_p_;
44     
45   String textstyle_str_;
46   bool first_b_;
47
48   Array<Request*> pre_reqs, post_reqs;
49   int fatal_error_i_;
50   Sources * source_l_;
51   int error_level_i_;
52   bool init_parse_b_;
53   My_lily_lexer * lexer_p_;
54  
55   Moment plet_mom();
56   void add_notename (String, Musical_pitch req_p);
57   Input here_input() const;
58   void remember_spot();
59   Input pop_spot();
60     
61   Paper_def*default_paper_p();
62   Midi_def*default_midi_p();
63   void do_yyparse();
64   void parser_error (String);
65   void clear_notenames();
66
67   Array<Request*>* get_parens_request (int t);
68     
69   void set_debug();
70   void set_yydebug (bool);
71   bool ignore_version_b_;
72 public:
73   void do_init_file();
74   void parse_file ( String init_str, String file_str);
75   My_lily_parser (Sources * sources_l);
76   ~My_lily_parser();
77   void set_version_check (bool ignore);
78 };
79
80 #endif // MY_LILY_PARSER_HH