]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/my-lily-lexer.hh
* Another grand 2003 update.
[lilypond.git] / lily / include / my-lily-lexer.hh
index 8bdcd6ee47fbd39a36092d9945acd8fd08f67ba1..f416eecfa9c8dbe90e980dd70a674bc24b765ad8 100644 (file)
@@ -3,20 +3,20 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef LEXER_HH
 #define LEXER_HH
 
-#include <FlexLexer.h>
+#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<Scheme_hash_table> 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;
 };