From a3cb4c5d02f0ee75094fc27814c71f8a025d034b Mon Sep 17 00:00:00 2001 From: sbrandt Date: Wed, 3 Apr 2013 19:12:46 +0000 Subject: Add the basic grammar files, and the changes to the piraha code necessary to parse all of Cactus. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4990 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/piraha/Bracket.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/piraha/Bracket.cc') diff --git a/src/piraha/Bracket.cc b/src/piraha/Bracket.cc index 47f5c443..d16d75da 100644 --- a/src/piraha/Bracket.cc +++ b/src/piraha/Bracket.cc @@ -95,7 +95,7 @@ bool Bracket::match(Matcher *m) { } } -void insertc(std::ostream& o,char c) { +void piraha::insertc(std::ostream& o,char c) { if(c == '-') { o << "\\-"; } else if(c == '\n') { @@ -104,7 +104,9 @@ void insertc(std::ostream& o,char c) { o << "\\r"; } else if(c == '\t') { o << "\\t"; - } else if(strchr("[]-",c)>=0) { + } else if(c == '\b') { + o << "\\b"; + } else if(strchr("\\\"[]-",c) != 0) { o << "\\" << c; } else { o << c; -- cgit v1.2.3