Commit 45938fdc authored by bonnell's avatar bonnell

reapply Jeremy's fix from last November, to fix expression parsing problems

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7199 18c085ea-50e0-402c-830e-de6fd14e8384
parent 04ddf9b1
......@@ -121,6 +121,9 @@ struct PARSER_API ParseElem
// Tom Fogal, Wed Apr 29 15:36:42 MDT 2009
// Check for empty `elems' so we don't deref an empty vector.
//
// Kathleen Bonnell, Tue May 5 17:23:42 PDT 2009
// Revert GetParseTree changes back to Jeremy's fix from Nov 17, 2008.
//
// ****************************************************************************
class PARSER_API Parser
{
......@@ -131,12 +134,7 @@ public:
void ParseOneToken(Token *);
bool Accept() { return accept; }
virtual ParseTreeNode *Parse(const std::string &) = 0;
ParseTreeNode *GetParseTree() {
if(elems.empty()) {
return NULL;
}
return elems[0].node;
}
ParseTreeNode *GetParseTree() { return parseTree; }
void SetGrammar(Grammar * g) { G = g; }
protected:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment