2 my-lily-parser.hh -- declare My_lily_parser
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #ifndef MY_LILY_PARSER_HH
10 #define MY_LILY_PARSER_HH
13 #include "duration.hh"
21 State for the parser. Do not ever add any variables to parse
22 musical content here. We still have to remove default_duration_.
24 TODO: interface is too complicated
28 DECLARE_SMOBS (My_lily_parser, );
29 friend int yyparse (void*);
31 Array<Input> define_spots_;
33 char const* here_str0 () const;
34 Simultaneous_music *get_chord (Pitch tonic,
35 Array<Pitch> *adds, Array<Pitch> *subs,
36 Pitch *inversion, Pitch* bass, Duration d);
37 void set_chord_tremolo (int type_i);
38 void set_last_duration (Duration const *);
39 void set_last_pitch (Pitch const *);
42 My_lily_lexer *lexer_;
44 Duration default_duration_;
45 String output_basename_;
46 // Protected_scm header_;
51 bool ignore_version_b_;
54 My_lily_parser (Sources *sources);
55 My_lily_parser (My_lily_parser const&);
57 DECLARE_SCHEME_CALLBACK (paper_description, ());
59 Input here_input () const;
61 void beam_check (SCM);
64 void parse_file (String init, String name, String out_name);
65 void parse_string (String ly_code);
66 void parser_error (String);
68 void set_yydebug (bool);
71 DECLARE_UNSMOB (My_lily_parser, my_lily_parser);
73 SCM ly_parse_file (SCM);
74 SCM ly_parse_string (SCM);
75 // SCM ly_parser_add_book_and_score (SCM, SCM);
76 SCM ly_parser_print_book (SCM, SCM);
77 SCM ly_parser_print_score (SCM, SCM);
78 SCM ly_parser_bookify (SCM, SCM);
79 SCM ly_parser_scorify (SCM, SCM);
81 Output_def *get_paper (My_lily_parser *parser);
82 Output_def *get_midi (My_lily_parser *parser);
83 Output_def *get_bookpaper (My_lily_parser *parser);
85 #endif /* MY_LILY_PARSER_HH */