2 lexer.hh -- declare My_flex_lexer
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
11 #include <FlexLexer.h>
18 void yyerror(char const *s);
25 int default_duration, default_dots, default_octave_i_;
26 int default_plet_type, default_plet_dur;
27 String textstyle_str_;
29 bool last_duration_mode ;
33 void set_default_duration(int *);
34 void set_last_duration(int n);
35 void set_duration_mode(String s);
36 void get_default_duration(int *);
37 void set_plet(int,int);
40 /// lexer with provisions for include files.
41 struct My_flex_lexer : yyFlexLexer {
44 Array<Input_file*> include_stack_;
45 Assoc<String, Identifier*> *identifier_assoc_p_;
46 Keyword_table * keytable_p_;
51 char const* here_ch_c_l();
52 int lookup_keyword(String);
53 void lookup_notename(int &large, int &small, String s);
55 void push_note_state();
56 void push_lyric_state();
58 void LexerError(char const *);
60 Identifier*lookup_identifier(String s);
62 void add_identifier(Identifier*i);
64 void new_input(String s);
67 void print_declarations() const;
70 extern My_flex_lexer *lexer;