X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmy-lily-lexer.hh;h=f416eecfa9c8dbe90e980dd70a674bc24b765ad8;hb=2745cbd907f8216a4cc1fc5f488ae19efdfdbd10;hp=8bdcd6ee47fbd39a36092d9945acd8fd08f67ba1;hpb=a6ee9dcd388111e842064a8d46ab06c4897a00d2;p=lilypond.git diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index 8bdcd6ee47..f416eecfa9 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -3,20 +3,20 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2002 Han-Wen Nienhuys + (c) 1997--2003 Han-Wen Nienhuys */ #ifndef LEXER_HH #define LEXER_HH -#include +#include "includable-lexer.hh" +#include "input.hh" #include "dictionary.hh" #include "lily-proto.hh" #include "flower-proto.hh" #include "array.hh" #include "string.hh" -#include "includable-lexer.hh" #include "duration.hh" #include "pitch.hh" #include "protected-scm.hh" @@ -28,10 +28,10 @@ void set_lexer (); /// lexer for Lilypond class My_lily_lexer : public Includable_lexer { + Protected_scm scopes_; public: String main_input_string_; void * lexval; - Scheme_hash_table * toplevel_variable_tab_; bool main_input_b_; /* @@ -39,8 +39,6 @@ public: */ Protected_scm chordmodifier_tab_; Protected_scm pitchname_tab_; - - Link_array scopes_; Keyword_table * keytable_; int errorlevel_; @@ -48,12 +46,19 @@ public: ~My_lily_lexer (); int yylex (); + Input last_input_; + void prepare_for_next_token (); + int try_special_identifiers (SCM* ,SCM); Input here_input () const; - + + void add_scope (SCM); + SCM remove_scope (); + void start_main_input (); SCM lookup_identifier (String s); void push_note_state (); + void push_markup_state (); void push_figuredbass_state (); void push_chord_state (); void push_lyric_state (); @@ -67,8 +72,9 @@ public: private: int lookup_keyword (String); int scan_bare_word (String); + SCM scan_markup_word (String); int scan_escaped_word (String); - + int identifier_type (SCM); char escaped_char (char) const; };