renamed "ignored" flag to "process" in token definitions

This commit is contained in:
Josh Holtrop committed 2010-05-18 14:22:11 -04:00
1 parent 953796ec23
commit b90b83ab0f
4 files changed
+9 -7

No files matched your search

+2 -1
View File
@@ -71,7 +71,7 @@ refptr<string> Parser::buildTokenList()
*tokenlist += " ";
*tokenlist += "{ \"" + m_tokens[i]->getName() + "\", \""
+ m_tokens[i]->getCString() + "\", "
+ (m_tokens[i]->getIgnored() ? "true" : "false") + " }";
+ (m_tokens[i]->getProcessFlag() ? "true" : "false") + " }";
if (i < m_tokens.size() - 1)
*tokenlist += ", \\\n";
}
@@ -232,6 +232,7 @@ bool Parser::parseInputFile(char * buff, int size)
if (ovector[8] >= 0 && ovector[9] >= 0
&& ovector[9] - ovector[8] > 0)
{
td->setProcessFlag(true);
code = ""; /* FIXME: function definition */
gathering_code = true;
}
+3 -3
View File
@@ -51,7 +51,7 @@ static string c_escape(const string & orig)
TokenDefinition::TokenDefinition()
: m_ignored(false)
: m_process(false)
{
}
@@ -76,9 +76,9 @@ bool TokenDefinition::create(const string & name,
{
(*parts)[i] = trim((*parts)[i]);
string & s = (*parts)[i];
if (s == "i")
if (s == "p")
{
m_ignored = true;
m_process = true;
}
else
{
+3 -2
View File
@@ -12,12 +12,13 @@ class TokenDefinition
const std::string & definition, const std::string & flags);
std::string getCString() const;
std::string getName() const { return m_name; }
bool getIgnored() const { return m_ignored; }
bool getProcessFlag() const { return m_process; }
void setProcessFlag(bool p) { m_process = p; }
protected:
std::string m_name;
std::string m_definition;
bool m_ignored;
bool m_process;
};
#endif
+1 -1
View File
@@ -38,7 +38,7 @@ bool I_CLASSNAME::parse(istream & i)
struct {
const char * name;
const char * definition;
bool ignored;
bool process;
pcre * re;
pcre_extra * re_extra;
} tokens[] = {