]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/my-lily-parser.hh
release: 0.0.44
[lilypond.git] / lily / include / my-lily-parser.hh
1 /*
2   my-lily-parser.hh -- declare 
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
22 class My_lily_parser {
23 public:
24     friend int yyparse( void*);
25    
26     int default_octave_i_;
27     Duration default_duration_;
28     String textstyle_str_;
29     
30     bool last_duration_mode ;
31
32     Array<Request*> pre_reqs, post_reqs;
33     Array<const char *> define_spot_array_;
34     char const* defined_ch_C_;
35     int fatal_error_i_;
36     Sources * source_l_;
37     int error_level_i_;
38     bool init_parse_b_;
39     My_lily_lexer * lexer_p_;
40  
41     Moment plet_mom();
42     void add_requests( Voice_element*v);
43
44     Voice_element * get_note_element(Note_req * ,Duration *);
45     Voice_element* get_rest_element(String,Duration *);
46     Voice_element* get_word_element(Text_def*, Duration*);
47     void set_last_duration(Duration const *);
48     void set_duration_mode(String s);
49     char const* here_ch_C()const;
50     void remember_spot();
51     Paper_def*default_paper();
52     void do_yyparse();
53     void parser_error(String);
54
55     Request* get_parens_request(char c);
56     
57     void set_debug();
58     void set_yydebug(bool);
59     void print_declarations();
60 public:
61     void parse_file ( String init_str, String file_str);
62     My_lily_parser(Sources * sources_l);
63 };
64
65 #endif // MY_LILY_PARSER_HH