summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/parser.h b/src/parser.h
index a925188..f4c4a74 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -1,7 +1,7 @@
1#ifndef BU_PARSER_H 1#ifndef BU_PARSER_H
2#define BU_PARSER_H 2#define BU_PARSER_H
3 3
4#include "bu/fstring.h" 4#include "bu/string.h"
5#include "bu/list.h" 5#include "bu/list.h"
6#include "bu/array.h" 6#include "bu/array.h"
7#include "bu/hash.h" 7#include "bu/hash.h"
@@ -43,7 +43,7 @@ namespace Bu
43 void parse(); 43 void parse();
44 44
45 void setRootNonTerminal( int iRoot ); 45 void setRootNonTerminal( int iRoot );
46 void setRootNonTerminal( const Bu::FString &sRoot ); 46 void setRootNonTerminal( const Bu::String &sRoot );
47 47
48 typedef Bu::Signal1<void, Parser &> Reduction; 48 typedef Bu::Signal1<void, Parser &> Reduction;
49 49
@@ -87,17 +87,17 @@ namespace Bu
87 bool bCanSkip; 87 bool bCanSkip;
88 }; 88 };
89 89
90 int addNonTerminal( const Bu::FString &sName, NonTerminal &nt ); 90 int addNonTerminal( const Bu::String &sName, NonTerminal &nt );
91 int addNonTerminal( const Bu::FString &sName ); 91 int addNonTerminal( const Bu::String &sName );
92 void setNonTerminal( const Bu::FString &sName, NonTerminal &nt ); 92 void setNonTerminal( const Bu::String &sName, NonTerminal &nt );
93 int getNonTerminalId( const Bu::FString &sName ); 93 int getNonTerminalId( const Bu::String &sName );
94 bool hasNonTerminal( const Bu::FString &sName ); 94 bool hasNonTerminal( const Bu::String &sName );
95 95
96 int addReduction( const Bu::FString &sName, const Reduction &r ); 96 int addReduction( const Bu::String &sName, const Reduction &r );
97 int addReduction( const Bu::FString &sName ); 97 int addReduction( const Bu::String &sName );
98 void setReduction( const Bu::FString &sName, const Reduction &r ); 98 void setReduction( const Bu::String &sName, const Reduction &r );
99 int getReductionId( const Bu::FString &sName ); 99 int getReductionId( const Bu::String &sName );
100 bool hasReduction( const Bu::FString &sName ); 100 bool hasReduction( const Bu::String &sName );
101 101
102 private: 102 private:
103 bool selectProduction( int iNt, Lexer::Token *ptCur ); 103 bool selectProduction( int iNt, Lexer::Token *ptCur );
@@ -108,7 +108,7 @@ namespace Bu
108 typedef Bu::List<Lexer::Token *> TokenStack; 108 typedef Bu::List<Lexer::Token *> TokenStack;
109 typedef Bu::List<Production::const_iterator> StateStack; 109 typedef Bu::List<Production::const_iterator> StateStack;
110 typedef Bu::Array<Reduction> ReductionArray; 110 typedef Bu::Array<Reduction> ReductionArray;
111 typedef Bu::Hash<Bu::FString,int> NameIndexHash; 111 typedef Bu::Hash<Bu::String,int> NameIndexHash;
112 typedef Bu::Array<NonTerminal> NonTerminalArray; 112 typedef Bu::Array<NonTerminal> NonTerminalArray;
113 113
114 LexerStack sLexer; 114 LexerStack sLexer;