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>
13 #include <FlexLexer.h>
16 #include "dictionary.hh"
17 #include "lily-proto.hh"
18 #include "flower-proto.hh"
21 #include "includable-lexer.hh"
22 #include "duration.hh"
24 #include "protected-scm.hh"
30 /// lexer for Lilypond
31 class My_lily_lexer : public Includable_lexer
33 Protected_scm scopes_;
35 String main_input_string_;
40 Scheme hash tables with (oct name acc) values, and symbol keys
42 Protected_scm chordmodifier_tab_;
43 Protected_scm pitchname_tab_;
44 Keyword_table * keytable_;
52 void prepare_for_next_token ();
53 int try_special_identifiers (SCM* ,SCM);
54 Input here_input () const;
59 void start_main_input ();
61 SCM lookup_identifier (String s);
62 void push_note_state ();
63 void push_markup_state ();
64 void push_figuredbass_state ();
65 void push_chord_state ();
66 void push_lyric_state ();
68 void LexerError (char const *);
69 void set_identifier (SCM name_string, SCM);
70 bool note_state_b () const;
71 bool chord_state_b () const;
72 bool lyric_state_b () const;
73 bool figure_state_b () const;
75 int lookup_keyword (String);
76 int scan_bare_word (String);
77 SCM scan_markup_word (String);
78 int scan_escaped_word (String);
79 int identifier_type (SCM);
80 char escaped_char (char) const;