2 lexer.hh -- declare My_lily_lexer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include <FlexLexer.h>
15 #include "dictionary.hh"
16 #include "lily-proto.hh"
17 #include "flower-proto.hh"
20 #include "includable-lexer.hh"
21 #include "duration.hh"
23 #include "protected-scm.hh"
29 /// lexer for Lilypond
30 class My_lily_lexer : public Includable_lexer
32 Protected_scm scopes_;
34 String main_input_string_;
39 Scheme hash tables with (oct name acc) values, and symbol keys
41 Protected_scm chordmodifier_tab_;
42 Protected_scm pitchname_tab_;
43 Keyword_table * keytable_;
51 void prepare_for_next_token ();
52 int try_special_identifiers (SCM* ,SCM);
53 Input here_input () const;
58 void start_main_input ();
60 SCM lookup_identifier (String s);
61 void push_note_state ();
62 void push_figuredbass_state ();
63 void push_chord_state ();
64 void push_lyric_state ();
66 void LexerError (char const *);
67 void set_identifier (SCM name_string, SCM);
68 bool note_state_b () const;
69 bool chord_state_b () const;
70 bool lyric_state_b () const;
71 bool figure_state_b () const;
73 int lookup_keyword (String);
74 int scan_bare_word (String);
75 int scan_escaped_word (String);
76 int identifier_type (SCM);
77 char escaped_char (char) const;