]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.44
authorfred <fred>
Fri, 21 Mar 1997 13:46:53 +0000 (13:46 +0000)
committerfred <fred>
Fri, 21 Mar 1997 13:46:53 +0000 (13:46 +0000)
lib/include/includable-lexer.hh [new file with mode: 0644]

diff --git a/lib/include/includable-lexer.hh b/lib/include/includable-lexer.hh
new file mode 100644 (file)
index 0000000..3a07618
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+  includable-lexer.hh -- declare 
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef INCLUDABLE_LEXER_HH
+#define INCLUDABLE_LEXER_HH
+#include "string.hh"
+#include <FlexLexer.h>
+#include "varray.hh"
+#include "fproto.hh"
+#include "proto.hh"
+
+// GIGA urg!
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+/**
+  an yyFlexLexer child with provisions for inclusion.
+ */
+class Includable_lexer : public yyFlexLexer {
+    Array<YY_BUFFER_STATE> state_stack_;
+protected:
+    bool  close_input();
+    Array<Source_file*> include_stack_;
+    Array<int> char_count_stack_;
+public:
+    void new_input(String s,Sources*);
+    Includable_lexer();
+    ~Includable_lexer();
+    void add_lexed_char(int);
+    char const * here_ch_C();
+};
+
+
+#endif // INCLUDABLE_LEXER_HH