summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2016-12-01 07:22:35 -0700
committerMike Buland <eichlan@xagasoft.com>2016-12-01 07:22:35 -0700
commit50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b (patch)
treec793699ba61cb56d5415f09ed5469b13a6d36f19 /src/parser.h
parent2297488eae424197dce4ed6b1dc50ae67c093074 (diff)
downloadclic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.tar.gz
clic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.tar.bz2
clic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.tar.xz
clic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.zip
New layout for the parser, it doesn't parse yet.
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/parser.h b/src/parser.h
index 05fab0b..1caa229 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -49,14 +49,13 @@ public:
49 virtual ~Parser(); 49 virtual ~Parser();
50 50
51 void parse(); 51 void parse();
52 Number getVariable( const Bu::String &sName );
53 void setVariable( const Bu::String &sName, const Number &rValue );
54 52
55private: 53private:
56 void expr(); 54 void expr();
57 void exprP(); 55 void exprP();
58 56
59private: 57private:
58 void shift( const Token &t );
60 void reduce(); 59 void reduce();
61 int reqTokens( Token::Type eType ); 60 int reqTokens( Token::Type eType );
62 int getPriority( Token::Type eType ); 61 int getPriority( Token::Type eType );
@@ -66,11 +65,8 @@ private:
66 Lexer &lex; 65 Lexer &lex;
67 Bu::Stream &rOut; 66 Bu::Stream &rOut;
68 typedef Bu::List<Token> TokenStack; 67 typedef Bu::List<Token> TokenStack;
69 typedef Bu::Hash<Bu::String, Number> VarHash; 68 TokenStack tsParse;
70 TokenStack tsStack; 69 TokenStack tsScript;
71// TokenStack tsNonTerminal;
72 Number nZero;
73 VarHash hVars;
74}; 70};
75 71
76#endif 72#endif