summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2017-07-27 12:11:13 -0400
committerAdrian Thurston <thurston@colm.net>2017-07-27 12:11:13 -0400
commit3f74fc17cee81774ddcc29c0a3560f81f7b60b7d (patch)
treedd3cc86a2cbc0b6eceb2755f084800718842fb1c /src/parser.cc
parent1395ab646772f3c37e3fbad207d9f12a9d3f3140 (diff)
downloadcolm-3f74fc17cee81774ddcc29c0a3560f81f7b60b7d.tar.gz
added a read_reduce statement to call postfix reducer
Triggers the generation of the reducer. Accepts a stream.
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser.cc b/src/parser.cc
index 2ff0e98e..07dd57ae 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -691,7 +691,7 @@ LangExpr *BaseParser::send( const InputLoc &loc, LangVarRef *varRef,
ConsItemList *list, bool eof )
{
ParserText *parserText = ParserText::cons( loc,
- curNspace(), list, true, false, "" );
+ curNspace(), list, true, false, false, "" );
pd->parserTextList.append( parserText );
return LangExpr::cons( LangTerm::consSend( loc, varRef,
@@ -702,7 +702,7 @@ LangExpr *BaseParser::sendTree( const InputLoc &loc, LangVarRef *varRef,
ConsItemList *list, bool eof )
{
ParserText *parserText = ParserText::cons( loc,
- curNspace(), list, true, false, "" );
+ curNspace(), list, true, false, false, "" );
pd->parserTextList.append( parserText );
return LangExpr::cons( LangTerm::consSendTree( loc, varRef,
@@ -711,7 +711,7 @@ LangExpr *BaseParser::sendTree( const InputLoc &loc, LangVarRef *varRef,
LangExpr *BaseParser::parseCmd( const InputLoc &loc, bool tree, bool stop,
ObjectField *objField, TypeRef *typeRef, FieldInitVect *fieldInitVect,
- ConsItemList *list, bool used, bool reduce, const String &reducer )
+ ConsItemList *list, bool used, bool reduce, bool read, const String &reducer )
{
LangExpr *expr = 0;
@@ -733,7 +733,7 @@ LangExpr *BaseParser::parseCmd( const InputLoc &loc, bool tree, bool stop,
used = true;
ParserText *parserText = ParserText::cons( loc, curNspace(),
- list, used, reduce, reducer );
+ list, used, reduce, read, reducer );
pd->parserTextList.append( parserText );
LangTerm::Type langTermType = stop ? LangTerm::ParseStopType : ( tree ?