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