]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/my-lily-parser.hh
partial: 0.1.65.jcn
[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 "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   Melodic_req* get_melodic_req (Melodic_req* melodic, int quotes);
34   void set_nearest (Melodic_req* melodic);
35   String notename_str (Melodic_req* melodic);
36
37   void set_last_duration (Duration const *);
38   void set_default_duration (Duration const *);
39   void set_abbrev_beam (int type_i);
40   void set_duration_mode (String s);
41   void set_octave_mode (String s);
42   friend int yyparse (void*);
43
44 public:
45   int abbrev_beam_type_i_;
46   int default_octave_i_;
47   Melodic_req* last_melodic_;
48   Duration default_duration_;
49   Plet plet_;
50   Header *default_header_p_;
51     
52   String textstyle_str_;
53   bool first_b_;
54   bool last_duration_mode_b_ ;
55   bool relative_octave_mode_b_;
56   Array<Request*> pre_reqs, post_reqs;
57   int fatal_error_i_;
58   Sources * source_l_;
59   int error_level_i_;
60   bool init_parse_b_;
61   My_lily_lexer * lexer_p_;
62  
63   Moment plet_mom();
64   void add_notename (String, Melodic_req* req_p);
65   Input here_input() const;
66   void remember_spot();
67   Input pop_spot();
68     
69   Paper_def*default_paper_p();
70   Midi_def*default_midi_p();
71   void do_yyparse();
72   void parser_error (String);
73   void clear_notenames();
74
75   Array<Request*>* get_parens_request (int t);
76     
77   void set_debug();
78   void set_yydebug (bool);
79   bool ignore_version_b_;
80 public:
81   void do_init_file();
82   void parse_file ( String init_str, String file_str);
83   My_lily_parser (Sources * sources_l);
84   ~My_lily_parser();
85   void set_version_check (bool ignore);
86 };
87
88 #endif // MY_LILY_PARSER_HH