diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-10-18 04:38:19 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-10-18 04:38:19 +0000 |
commit | 78463c30031a478936b21168a6fc93ae6eeaaeb9 (patch) | |
tree | 2216344a91f23088dcb4cf93492802c75577fad1 /src/parser.cpp | |
parent | 00ecd458ced768b3b8752cdd421a22244b7adc01 (diff) | |
download | libbu++-78463c30031a478936b21168a6fc93ae6eeaaeb9.tar.gz libbu++-78463c30031a478936b21168a6fc93ae6eeaaeb9.tar.bz2 libbu++-78463c30031a478936b21168a6fc93ae6eeaaeb9.tar.xz libbu++-78463c30031a478936b21168a6fc93ae6eeaaeb9.zip |
Several of these new files will go away, but I didn't want to lose them for now.
The parser works! The parser compiler works! It makes parsers!
Now we just have to implement post processing, token lookup tables, and storage.
Diffstat (limited to 'src/parser.cpp')
-rw-r--r-- | src/parser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 3ce73b6..4ad4ff9 100644 --- a/src/parser.cpp +++ b/src/parser.cpp | |||
@@ -205,6 +205,11 @@ int Bu::Parser::getNonTerminalId( const Bu::FString &sName ) | |||
205 | return hNonTerminalName.get( sName ); | 205 | return hNonTerminalName.get( sName ); |
206 | } | 206 | } |
207 | 207 | ||
208 | bool Bu::Parser::hasNonTerminal( const Bu::FString &sName ) | ||
209 | { | ||
210 | return hNonTerminalName.has( sName ); | ||
211 | } | ||
212 | |||
208 | int Bu::Parser::addReduction( const Bu::FString &sName, const Reduction &r ) | 213 | int Bu::Parser::addReduction( const Bu::FString &sName, const Reduction &r ) |
209 | { | 214 | { |
210 | int iId = aReduction.getSize(); | 215 | int iId = aReduction.getSize(); |
@@ -231,6 +236,11 @@ int Bu::Parser::getReductionId( const Bu::FString &sName ) | |||
231 | return hReductionName.get( sName ); | 236 | return hReductionName.get( sName ); |
232 | } | 237 | } |
233 | 238 | ||
239 | bool Bu::Parser::hasReduction( const Bu::FString &sName ) | ||
240 | { | ||
241 | return hReductionName.has( sName ); | ||
242 | } | ||
243 | |||
234 | // | 244 | // |
235 | // Bu::Parser::State | 245 | // Bu::Parser::State |
236 | // | 246 | // |