summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
commitf5aca1a1b402bd7ebc944dc6e6fe65828d863365 (patch)
tree4a0fdd8e166d5c4b03543279d332b9a858ef62df /src/parser.h
parent10c557562e1d67c55314c212371ea9cb7f802863 (diff)
downloadlibbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.gz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.bz2
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.xz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.zip
Bu::FString is now String, and there's a shell script to fix any other programs
that were using fstring, I hope.
Diffstat (limited to '')
-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;