diff options
| author | Mike Buland <mike@xagasoft.com> | 2013-11-14 15:35:47 -0700 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2013-11-14 15:35:47 -0700 |
| commit | abe7e449143052b07fae688da690c2a7d387a291 (patch) | |
| tree | 00742d14bce96777ce65589f9abeeca4cdadbc25 /src/parser.cpp | |
| parent | bc0484899acb3495f95d7400ff2eb804ae580096 (diff) | |
| download | clic-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 '')
| -rw-r--r-- | src/parser.cpp | 4 |
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 | ||
| 10 | Parser::Parser( Lexer &lex, Bu::Stream &rOut ) : | 10 | Parser::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 |
