diff options
author | Adrian Thurston <thurston@complang.org> | 2015-10-04 23:16:46 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-10-04 23:16:46 -0400 |
commit | 13d7c884e2a855418d68b8e45041b8ab4a20a85c (patch) | |
tree | eccbfb13e83812b01858317938f972913c7b7bf1 /src/parser.h | |
parent | 6fb0cdffbafb135edaec7d927e5e508997c1d826 (diff) | |
download | colm-13d7c884e2a855418d68b8e45041b8ab4a20a85c.tar.gz |
load reduction actions and generate a commit containing them
Diffstat (limited to 'src/parser.h')
-rw-r--r-- | src/parser.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/parser.h b/src/parser.h index 3365ff59..f2cf4f3e 100644 --- a/src/parser.h +++ b/src/parser.h @@ -41,6 +41,7 @@ struct BaseParser RegionSetVect regionStack; NamespaceVect namespaceStack; + ReductionVect reductionStack; StructStack structStack; ObjectDef *localFrameTop; NameScope *scopeTop; @@ -61,6 +62,9 @@ struct BaseParser ObjectDef *curLocalFrame() { return localFrameTop; } + + Reduction *curReduction() + { return reductionStack.top(); } /* Lexical feedback. */ @@ -82,6 +86,8 @@ struct BaseParser void addArgvList(); LexJoin *literalJoin( const InputLoc &loc, const String &data ); + Reduction *createReduction( const InputLoc loc, const String &name ); + void defineToken( const InputLoc &loc, String name, LexJoin *join, ObjectDef *objectDef, CodeBlock *transBlock, bool ignore, bool noPreIgnore, bool noPostIgnore ); @@ -112,7 +118,8 @@ struct BaseParser LexFactorAug *lexFactorLabel( const InputLoc &loc, const String &data, LexFactorAug *factorAug ); LexJoin *lexOptJoin( LexJoin *join, LexJoin *context ); - LangExpr *send( const InputLoc &loc, LangVarRef *varRef, ConsItemList *list, bool eof ); + LangExpr *send( const InputLoc &loc, LangVarRef *varRef, + ConsItemList *list, bool eof ); LangExpr *sendTree( const InputLoc &loc, LangVarRef *varRef, ConsItemList *list, bool eof ); LangExpr *parseCmd( const InputLoc &loc, bool tree, bool stop, ObjectField *objField, |