summaryrefslogtreecommitdiff
path: root/src/piraha/Matcher.cc
diff options
context:
space:
mode:
authorsbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-03-04 23:50:30 +0000
committersbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-03-04 23:50:30 +0000
commit638398785d624541bb8bd0c0f70b9eb3f8820e9b (patch)
treed9675b8fee659b4fc2c49ce33f405658af6b8176 /src/piraha/Matcher.cc
parent421cadbef8c00ccd47f72c95d25f8553a4aae786 (diff)
Significant upgrade of Piraha:
It no longer uses strings to store intermediate values in expressions. It now supports everything that was supported by the old expression parser. Comments added. Numerous pieces of error checking added. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4974 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/piraha/Matcher.cc')
-rw-r--r--src/piraha/Matcher.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/piraha/Matcher.cc b/src/piraha/Matcher.cc
index dad67a67..55f042be 100644
--- a/src/piraha/Matcher.cc
+++ b/src/piraha/Matcher.cc
@@ -16,6 +16,7 @@ bool Matcher::matches() {
smart_ptr<Pattern> p = g->patterns.get(pat);
if(!p.valid()) {
std::cout << "Grammar does not contain \"" << pat << "\"" << std::endl;
+ std::cout << g->patterns << std::endl;
}
assert(p.valid());
pos = 0;
@@ -53,9 +54,9 @@ void Matcher::showError() {
start_of_previous_line[i] = 0;
for(int i=0;i<input_size;i++) {
if(i == max_pos) {
- std::cout << "In rule '" << inrule_max
- << "' Line=" << line << std::endl;
error_pos = i;
+ std::cout << "In rule '" << inrule_max
+ << "' Line=" << line << std::endl;
while(input[i] == '\n'||input[i] == '\r') {
line++;
for(int j=1;j<num_previous_lines;j++) {