summaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-11-14 15:35:47 -0700
committerMike Buland <mike@xagasoft.com>2013-11-14 15:35:47 -0700
commitabe7e449143052b07fae688da690c2a7d387a291 (patch)
tree00742d14bce96777ce65589f9abeeca4cdadbc25 /src/parser.cpp
parentbc0484899acb3495f95d7400ff2eb804ae580096 (diff)
downloadclic-abe7e449143052b07fae688da690c2a7d387a291.tar.gz
clic-abe7e449143052b07fae688da690c2a7d387a291.tar.bz2
clic-abe7e449143052b07fae688da690c2a7d387a291.tar.xz
clic-abe7e449143052b07fae688da690c2a7d387a291.zip
Fixed (?) parsing order of operations bug, added unit tests.
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 643b7bb..cf3bb3f 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -5,7 +5,7 @@
5#include <bu/sio.h> 5#include <bu/sio.h>
6#include <stdlib.h> 6#include <stdlib.h>
7 7
8//#define DEBUG 8#define DEBUG
9 9
10Parser::Parser( Lexer &lex, Bu::Stream &rOut ) : 10Parser::Parser( Lexer &lex, Bu::Stream &rOut ) :
11 lex( lex ), 11 lex( lex ),
@@ -155,7 +155,7 @@ void Parser::parse()
155 155
156 default: 156 default:
157 if( tsNonTerminal.getSize() == 0 || 157 if( tsNonTerminal.getSize() == 0 ||
158 getPriority( tsNonTerminal.peek().eType ) <= 158 getPriority( tsNonTerminal.peek().eType ) <
159 getPriority( t.eType ) ) 159 getPriority( t.eType ) )
160 { 160 {
161#ifdef DEBUG 161#ifdef DEBUG