]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/my-lily-parser.hh
release: 1.1.53
[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--1999 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 "parray.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 /**
23    State for the parser.  Do not ever add any variables to parse
24    musical content here.  We still have to remove default_duration_.
25    
26  */
27 class My_lily_parser 
28 {
29 public:
30   My_lily_parser (Sources * sources_l);
31   ~My_lily_parser();
32
33   void do_init_file();
34   void parse_file ( String init_str, String file_str);
35   void set_version_check (bool ignore);
36
37 public:
38   Duration default_duration_;
39   Scope *default_header_p_;
40   bool first_b_;
41   int fatal_error_i_;
42   Sources * source_l_;
43   int error_level_i_;
44   bool init_parse_b_;
45   My_lily_lexer * lexer_p_;
46   bool ignore_version_b_;
47
48
49   
50   Input here_input() const;
51   void remember_spot();
52   Input pop_spot();
53     
54   Paper_def*default_paper_p();
55   Midi_def*default_midi_p();
56   void do_yyparse();
57   void parser_error (String);
58
59   void set_debug();
60   void set_yydebug (bool);
61 private:
62   char const* here_ch_C() const;
63   Array<Input> define_spot_array_;
64   String init_str_;
65
66   Simultaneous_music * get_note_element (Note_req * ,Duration *);
67   Simultaneous_music * get_chord (Musical_pitch, Array<Musical_pitch>*, Array<Musical_pitch>*, Musical_pitch*, Duration);
68   Simultaneous_music* get_rest_element (String, Duration *);
69   Simultaneous_music* get_word_element (String, Duration*);
70   String notename_str (Melodic_req* melodic);
71   void set_last_duration (Duration const *);
72   friend int yyparse (void*);
73 };
74
75 #endif // MY_LILY_PARSER_HH