]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/my-lily-parser.hh
1da7940b692ef945eed776b67a0858fff1d15e6c
[lilypond.git] / lily / include / my-lily-parser.hh
1 /*
2   my-lily-parser.hh -- declare My_lily_parser
3
4   source file of the 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 "proto.hh"
13 #include "duration.hh"
14 #include "string.hh"
15 #include "varray.hh"
16 #include "lily-proto.hh"
17 #include "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   
27
28     void add_requests( Voice_element*v);
29
30     Voice_element * get_note_element(Note_req * ,Duration *);
31     Voice_element* get_rest_element(String,Duration *);
32     Voice_element* get_word_element(Text_def*, Duration*);
33     void set_last_duration(Duration const *);
34     void set_duration_mode(String s);
35     friend int yyparse( void*);
36 public:
37     int default_octave_i_;
38     Duration default_duration_;
39     String textstyle_str_;
40     
41     bool last_duration_mode ;
42     Array<Request*> pre_reqs, post_reqs;
43     int fatal_error_i_;
44     Sources * source_l_;
45     int error_level_i_;
46     bool init_parse_b_;
47     My_lily_lexer * lexer_p_;
48  
49     Moment plet_mom();
50     void add_notename(String, Melodic_req* req_p);
51     Input here_input()const;
52     void remember_spot();
53     Input pop_spot();
54     
55     Paper_def*default_paper();
56     void do_yyparse();
57     void parser_error(String);
58     void clear_notenames();
59
60     Request* get_parens_request(char c);
61     
62     void set_debug();
63     void set_yydebug(bool);
64     void print_declarations();
65 public:
66     void parse_file ( String init_str, String file_str);
67     My_lily_parser(Sources * sources_l);
68     ~My_lily_parser();
69 };
70
71 #endif // MY_LILY_PARSER_HH