diff options
| -rw-r--r-- | makefile | 2 | ||||
| -rw-r--r-- | src/MoonP/parser.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
| @@ -2,7 +2,7 @@ | |||
| 2 | # The name of the executable to be created | 2 | # The name of the executable to be created |
| 3 | BIN_NAME := moonc | 3 | BIN_NAME := moonc |
| 4 | # Compiler used | 4 | # Compiler used |
| 5 | CXX ?= g++ | 5 | CXX ?= clang |
| 6 | # Extension of source files used in the project | 6 | # Extension of source files used in the project |
| 7 | SRC_EXT = cpp | 7 | SRC_EXT = cpp |
| 8 | # Path to the source directory, relative to the makefile | 8 | # Path to the source directory, relative to the makefile |
diff --git a/src/MoonP/parser.cpp b/src/MoonP/parser.cpp index 19c0068..94f80af 100644 --- a/src/MoonP/parser.cpp +++ b/src/MoonP/parser.cpp | |||
| @@ -824,7 +824,7 @@ bool _context::parse_non_term(rule &r) { | |||
| 824 | rule::_state old_state = r.m_state; | 824 | rule::_state old_state = r.m_state; |
| 825 | 825 | ||
| 826 | //success/failure result | 826 | //success/failure result |
| 827 | bool ok; | 827 | bool ok = false; |
| 828 | 828 | ||
| 829 | //compute the new position | 829 | //compute the new position |
| 830 | size_t new_pos = m_pos.m_it - m_begin; | 830 | size_t new_pos = m_pos.m_it - m_begin; |
| @@ -927,7 +927,7 @@ bool _context::parse_term(rule &r) { | |||
| 927 | rule::_state old_state = r.m_state; | 927 | rule::_state old_state = r.m_state; |
| 928 | 928 | ||
| 929 | //success/failure result | 929 | //success/failure result |
| 930 | bool ok; | 930 | bool ok = false; |
| 931 | 931 | ||
| 932 | //compute the new position | 932 | //compute the new position |
| 933 | size_t new_pos = m_pos.m_it - m_begin; | 933 | size_t new_pos = m_pos.m_it - m_begin; |
| @@ -1026,7 +1026,7 @@ bool _context::parse_term(rule &r) { | |||
| 1026 | 1026 | ||
| 1027 | //parse non-term rule internal. | 1027 | //parse non-term rule internal. |
| 1028 | bool _context::_parse_non_term(rule &r) { | 1028 | bool _context::_parse_non_term(rule &r) { |
| 1029 | bool ok; | 1029 | bool ok = false; |
| 1030 | if (_private::get_parse_proc(r)) { | 1030 | if (_private::get_parse_proc(r)) { |
| 1031 | pos b = m_pos; | 1031 | pos b = m_pos; |
| 1032 | ok = _private::get_expr(r)->parse_non_term(*this); | 1032 | ok = _private::get_expr(r)->parse_non_term(*this); |
| @@ -1043,7 +1043,7 @@ bool _context::_parse_non_term(rule &r) { | |||
| 1043 | 1043 | ||
| 1044 | //parse term rule internal. | 1044 | //parse term rule internal. |
| 1045 | bool _context::_parse_term(rule &r) { | 1045 | bool _context::_parse_term(rule &r) { |
| 1046 | bool ok; | 1046 | bool ok = false; |
| 1047 | if (_private::get_parse_proc(r)) { | 1047 | if (_private::get_parse_proc(r)) { |
| 1048 | pos b = m_pos; | 1048 | pos b = m_pos; |
| 1049 | ok = _private::get_expr(r)->parse_term(*this); | 1049 | ok = _private::get_expr(r)->parse_term(*this); |
