changed: Pattern class has been split into two classes: Pattern and PatternParser
in Pattern we have only the tree in PatternParser there is the whole logic used to parse a file git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@969 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "pattern.h"
|
||||
#include "patternparser.h"
|
||||
|
||||
|
||||
|
||||
@@ -45,13 +45,8 @@ namespace Ezc
|
||||
|
||||
|
||||
|
||||
Pattern::Pattern()
|
||||
PatternParser::PatternParser()
|
||||
{
|
||||
Clear();
|
||||
|
||||
commentary_start = L"<!-- ";
|
||||
commentary_stop = L" -->";
|
||||
|
||||
allow_include = true;
|
||||
input_as_utf8 = true;
|
||||
delete_white_text_items = false;
|
||||
@@ -61,30 +56,7 @@ Pattern::Pattern()
|
||||
|
||||
|
||||
|
||||
void Pattern::Clear()
|
||||
{
|
||||
item_root.Clear();
|
||||
}
|
||||
|
||||
|
||||
void Pattern::ClearCache()
|
||||
{
|
||||
ClearCache(item_root);
|
||||
}
|
||||
|
||||
|
||||
void Pattern::ClearCache(Item & item)
|
||||
{
|
||||
for(size_t f = 0; f < item.functions.size() ; ++f)
|
||||
item.functions[f].fun_cache = 0;
|
||||
|
||||
for(size_t i = 0; i < item.item_tab.size() ; ++i)
|
||||
ClearCache(*item.item_tab[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::Directory(const char * dir, const char * dir2)
|
||||
void PatternParser::Directory(const char * dir, const char * dir2)
|
||||
{
|
||||
directory.clear();
|
||||
directory2.clear();
|
||||
@@ -98,7 +70,7 @@ void Pattern::Directory(const char * dir, const char * dir2)
|
||||
|
||||
|
||||
|
||||
void Pattern::Directory(const std::string & dir)
|
||||
void PatternParser::Directory(const std::string & dir)
|
||||
{
|
||||
PT::UTF8ToWide(dir, directory);
|
||||
directory2.clear();
|
||||
@@ -106,7 +78,7 @@ void Pattern::Directory(const std::string & dir)
|
||||
|
||||
|
||||
|
||||
void Pattern::Directory(const std::string & dir, const std::string & dir2)
|
||||
void PatternParser::Directory(const std::string & dir, const std::string & dir2)
|
||||
{
|
||||
PT::UTF8ToWide(dir, directory);
|
||||
PT::UTF8ToWide(dir2, directory2);
|
||||
@@ -114,7 +86,7 @@ void Pattern::Directory(const std::string & dir, const std::string & dir2)
|
||||
|
||||
|
||||
|
||||
void Pattern::Directory(const wchar_t * dir, const wchar_t * dir2)
|
||||
void PatternParser::Directory(const wchar_t * dir, const wchar_t * dir2)
|
||||
{
|
||||
directory.clear();
|
||||
directory2.clear();
|
||||
@@ -128,7 +100,7 @@ void Pattern::Directory(const wchar_t * dir, const wchar_t * dir2)
|
||||
|
||||
|
||||
|
||||
void Pattern::Directory(const std::wstring & dir)
|
||||
void PatternParser::Directory(const std::wstring & dir)
|
||||
{
|
||||
directory = dir;
|
||||
directory2.clear();
|
||||
@@ -136,7 +108,7 @@ void Pattern::Directory(const std::wstring & dir)
|
||||
|
||||
|
||||
|
||||
void Pattern::Directory(const std::wstring & dir, const std::wstring & dir2)
|
||||
void PatternParser::Directory(const std::wstring & dir, const std::wstring & dir2)
|
||||
{
|
||||
directory = dir;
|
||||
directory2 = dir2;
|
||||
@@ -144,79 +116,77 @@ void Pattern::Directory(const std::wstring & dir, const std::wstring & dir2)
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseFile(const std::string & file_name)
|
||||
void PatternParser::ParseFile(const std::string & file_name, Pattern & pattern)
|
||||
{
|
||||
ParseFile( file_name.c_str() );
|
||||
ParseFile(file_name.c_str(), pattern);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseFile(const char * file_name)
|
||||
void PatternParser::ParseFile(const char * file_name, Pattern & pattern)
|
||||
{
|
||||
PT::UTF8ToWide(file_name, item_root.file_name);
|
||||
pat = &pattern;
|
||||
PT::UTF8ToWide(file_name, pat->item_root.file_name);
|
||||
include_level = 0;
|
||||
CreateTreeReadIncludeSkipAllowFlag(item_root);
|
||||
CreateTreeReadIncludeSkipAllowFlag(pat->item_root);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseFile(const std::wstring & file_name)
|
||||
void PatternParser::ParseFile(const std::wstring & file_name, Pattern & pattern)
|
||||
{
|
||||
ParseFile( file_name.c_str() );
|
||||
ParseFile(file_name.c_str(), pattern);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseFile(const wchar_t * file_name)
|
||||
void PatternParser::ParseFile(const wchar_t * file_name, Pattern & pattern)
|
||||
{
|
||||
item_root.file_name = file_name;
|
||||
pat = &pattern;
|
||||
pat->item_root.file_name = file_name;
|
||||
include_level = 0;
|
||||
CreateTreeReadIncludeSkipAllowFlag(item_root);
|
||||
CreateTreeReadIncludeSkipAllowFlag(pat->item_root);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseString(const char * str)
|
||||
void PatternParser::ParseString(const char * str, Pattern & pattern)
|
||||
{
|
||||
if( input_as_utf8 )
|
||||
PT::UTF8ToWide(str, string_content);
|
||||
else
|
||||
AssignString(str, string_content);
|
||||
|
||||
ParseString(string_content.c_str());
|
||||
ParseString(string_content.c_str(), pattern);
|
||||
string_content.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseString(const std::string & str)
|
||||
void PatternParser::ParseString(const std::string & str, Pattern & pattern)
|
||||
{
|
||||
ParseString(str.c_str());
|
||||
ParseString(str.c_str(), pattern);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseString(const wchar_t * str)
|
||||
void PatternParser::ParseString(const wchar_t * str, Pattern & pattern)
|
||||
{
|
||||
pat = &pattern;
|
||||
itext = str;
|
||||
include_level = 0;
|
||||
CreateTree(item_root);
|
||||
CreateTree(pat->item_root);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::ParseString(const std::wstring & str)
|
||||
void PatternParser::ParseString(const std::wstring & str, Pattern & pattern)
|
||||
{
|
||||
ParseString(str.c_str());
|
||||
ParseString(str.c_str(), pattern);
|
||||
}
|
||||
|
||||
|
||||
@@ -227,28 +197,28 @@ void Pattern::ParseString(const std::wstring & str)
|
||||
|
||||
|
||||
|
||||
void Pattern::AllowInclude(bool allow)
|
||||
void PatternParser::AllowInclude(bool allow)
|
||||
{
|
||||
allow_include = allow;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::DeleteWhiteTextItems(bool del)
|
||||
void PatternParser::DeleteWhiteTextItems(bool del)
|
||||
{
|
||||
delete_white_text_items = del;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::SetIncludeMax(int include_max)
|
||||
void PatternParser::SetIncludeMax(int include_max)
|
||||
{
|
||||
include_level_max = include_max;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::UTF8(bool utf8)
|
||||
void PatternParser::UTF8(bool utf8)
|
||||
{
|
||||
input_as_utf8 = utf8;
|
||||
}
|
||||
@@ -258,62 +228,11 @@ void Pattern::UTF8(bool utf8)
|
||||
|
||||
|
||||
|
||||
void Pattern::SetCommentary(const char * com_start, const char * com_stop)
|
||||
{
|
||||
PT::UTF8ToWide(com_start, commentary_start);
|
||||
PT::UTF8ToWide(com_stop, commentary_stop);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::SetCommentary(const std::string & com_start, const std::string & com_stop)
|
||||
{
|
||||
PT::UTF8ToWide(com_start, commentary_start);
|
||||
PT::UTF8ToWide(com_stop, commentary_stop);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::SetCommentary(const wchar_t * com_start, const wchar_t * com_stop)
|
||||
{
|
||||
commentary_start = com_start;
|
||||
commentary_stop = com_stop;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Pattern::SetCommentary(const std::wstring & com_start, const std::wstring & com_stop)
|
||||
{
|
||||
commentary_start = com_start;
|
||||
commentary_stop = com_stop;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateMsg(std::wstring & out, const wchar_t * type, const wchar_t * arg)
|
||||
{
|
||||
out = commentary_start;
|
||||
out += L"Ezc: ";
|
||||
out += type;
|
||||
|
||||
if( arg )
|
||||
{
|
||||
out += ' ';
|
||||
out += arg;
|
||||
}
|
||||
|
||||
out += commentary_stop;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool Pattern::HasFileAtBeginning(const wchar_t * path, const wchar_t * file)
|
||||
bool PatternParser::HasFileAtBeginning(const wchar_t * path, const wchar_t * file)
|
||||
{
|
||||
for(; *path && *file; ++path, ++file)
|
||||
{
|
||||
@@ -336,7 +255,7 @@ return false;
|
||||
".." is not allowed in the file path
|
||||
you cannot go up from your template directory
|
||||
*/
|
||||
bool Pattern::IsFileCorrect(const wchar_t * name)
|
||||
bool PatternParser::IsFileCorrect(const wchar_t * name)
|
||||
{
|
||||
while( *name )
|
||||
{
|
||||
@@ -361,7 +280,7 @@ return true;
|
||||
/*
|
||||
'name' must be a relative path - without a slash or backslash
|
||||
*/
|
||||
void Pattern::ReadFile(const std::wstring & name, std::wstring & result)
|
||||
void PatternParser::ReadFile(const std::wstring & name, std::wstring & result)
|
||||
{
|
||||
ReadFile(name.c_str(), result);
|
||||
}
|
||||
@@ -370,11 +289,11 @@ void Pattern::ReadFile(const std::wstring & name, std::wstring & result)
|
||||
/*
|
||||
'name' must be a relative path - without a slash or backslash
|
||||
*/
|
||||
void Pattern::ReadFile(const wchar_t * name, std::wstring & result)
|
||||
void PatternParser::ReadFile(const wchar_t * name, std::wstring & result)
|
||||
{
|
||||
if( !IsFileCorrect(name) )
|
||||
{
|
||||
CreateMsg(result, L"incorrect file name: ", name);
|
||||
pat->CreateMsg(result, L"incorrect file name: ", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -382,13 +301,13 @@ void Pattern::ReadFile(const wchar_t * name, std::wstring & result)
|
||||
|
||||
if( !ReadFileFromDir(directory, name, result) )
|
||||
if( !ReadFileFromDir(directory2, name, result) )
|
||||
CreateMsg(result, L"can't open: ", name);
|
||||
pat->CreateMsg(result, L"can't open: ", name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Pattern::ReadFileFromDir(const std::wstring & dir, const wchar_t * name, std::wstring & result)
|
||||
bool PatternParser::ReadFileFromDir(const std::wstring & dir, const wchar_t * name, std::wstring & result)
|
||||
{
|
||||
if( dir.empty() )
|
||||
return false;
|
||||
@@ -425,7 +344,7 @@ return true;
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadFile(std::ifstream & file, std::wstring & result)
|
||||
void PatternParser::ReadFile(std::ifstream & file, std::wstring & result)
|
||||
{
|
||||
if( input_as_utf8 )
|
||||
{
|
||||
@@ -440,7 +359,7 @@ void Pattern::ReadFile(std::ifstream & file, std::wstring & result)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadFileContent(std::ifstream & file, std::wstring & result)
|
||||
void PatternParser::ReadFileContent(std::ifstream & file, std::wstring & result)
|
||||
{
|
||||
while( true )
|
||||
{
|
||||
@@ -456,7 +375,7 @@ void Pattern::ReadFileContent(std::ifstream & file, std::wstring & result)
|
||||
|
||||
|
||||
|
||||
int Pattern::ReadCharInText()
|
||||
int PatternParser::ReadCharInText()
|
||||
{
|
||||
if( *itext==0 || *itext=='[' )
|
||||
return -1;
|
||||
@@ -471,7 +390,7 @@ return *(itext++);
|
||||
}
|
||||
|
||||
|
||||
bool Pattern::IsWhite(wchar_t c)
|
||||
bool PatternParser::IsWhite(wchar_t c)
|
||||
{
|
||||
// 13 (\r) is from a dos file at the end of a line (\r\n)
|
||||
// 160 is a non-breaking space
|
||||
@@ -484,7 +403,7 @@ return false;
|
||||
|
||||
|
||||
|
||||
void Pattern::SkipWhite()
|
||||
void PatternParser::SkipWhite()
|
||||
{
|
||||
while( IsWhite(*itext) )
|
||||
++itext;
|
||||
@@ -492,7 +411,7 @@ void Pattern::SkipWhite()
|
||||
|
||||
|
||||
|
||||
void Pattern::CheckWhiteAndDelete(std::wstring & s)
|
||||
void PatternParser::CheckWhiteAndDelete(std::wstring & s)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -507,7 +426,7 @@ size_t i;
|
||||
|
||||
|
||||
|
||||
bool Pattern::IsNameChar(wchar_t c)
|
||||
bool PatternParser::IsNameChar(wchar_t c)
|
||||
{
|
||||
return ((c>='a' && c<='z') ||
|
||||
(c>='A' && c<='Z') ||
|
||||
@@ -517,14 +436,14 @@ bool Pattern::IsNameChar(wchar_t c)
|
||||
|
||||
|
||||
|
||||
bool Pattern::IsDigit(wchar_t c)
|
||||
bool PatternParser::IsDigit(wchar_t c)
|
||||
{
|
||||
return (c>='0' && c<='9');
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Pattern::IsPositiveNumber(const std::wstring & str)
|
||||
bool PatternParser::IsPositiveNumber(const std::wstring & str)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -537,7 +456,7 @@ return true;
|
||||
|
||||
|
||||
// reading an expression name or a function name
|
||||
bool Pattern::ReadName(std::wstring & name)
|
||||
bool PatternParser::ReadName(std::wstring & name)
|
||||
{
|
||||
name.clear();
|
||||
SkipWhite();
|
||||
@@ -556,7 +475,7 @@ return !name.empty();
|
||||
|
||||
// string can have a quote character (escaped with a backslash) e.g. "sample text \"with quotes\""
|
||||
// use \\ to insert one backslash
|
||||
bool Pattern::ReadString(std::wstring & str)
|
||||
bool PatternParser::ReadString(std::wstring & str)
|
||||
{
|
||||
str.clear();
|
||||
SkipWhite();
|
||||
@@ -598,7 +517,7 @@ return true;
|
||||
|
||||
|
||||
|
||||
bool Pattern::ReadParams(Item::Function & function)
|
||||
bool PatternParser::ReadParams(Item::Function & function)
|
||||
{
|
||||
function.params.clear();
|
||||
|
||||
@@ -612,7 +531,7 @@ return !function.params.empty();
|
||||
|
||||
|
||||
|
||||
bool Pattern::ReadFunction(Item::Function & function)
|
||||
bool PatternParser::ReadFunction(Item::Function & function)
|
||||
{
|
||||
SkipWhite();
|
||||
|
||||
@@ -630,7 +549,7 @@ return true;
|
||||
|
||||
|
||||
|
||||
bool Pattern::ReadFunctions(Item & item)
|
||||
bool PatternParser::ReadFunctions(Item & item)
|
||||
{
|
||||
item.functions.clear();
|
||||
|
||||
@@ -646,7 +565,7 @@ return !item.functions.empty();
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTreeReadItemDirectiveCheckEnding(Item & item)
|
||||
void PatternParser::CreateTreeReadItemDirectiveCheckEnding(Item & item)
|
||||
{
|
||||
SkipWhite();
|
||||
|
||||
@@ -664,7 +583,7 @@ void Pattern::CreateTreeReadItemDirectiveCheckEnding(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIf(Item & item)
|
||||
void PatternParser::ReadDirectiveIf(Item & item)
|
||||
{
|
||||
item.type = Item::item_if;
|
||||
ReadFunctions(item);
|
||||
@@ -675,7 +594,7 @@ void Pattern::ReadDirectiveIf(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIfno(Item & item)
|
||||
void PatternParser::ReadDirectiveIfno(Item & item)
|
||||
{
|
||||
item.type = Item::item_ifno;
|
||||
ReadFunctions(item);
|
||||
@@ -686,7 +605,7 @@ void Pattern::ReadDirectiveIfno(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIfany(Item & item)
|
||||
void PatternParser::ReadDirectiveIfany(Item & item)
|
||||
{
|
||||
item.type = Item::item_ifany;
|
||||
|
||||
@@ -696,7 +615,7 @@ void Pattern::ReadDirectiveIfany(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIfone(Item & item)
|
||||
void PatternParser::ReadDirectiveIfone(Item & item)
|
||||
{
|
||||
item.type = Item::item_ifone;
|
||||
|
||||
@@ -706,7 +625,7 @@ void Pattern::ReadDirectiveIfone(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIfanyno(Item & item)
|
||||
void PatternParser::ReadDirectiveIfanyno(Item & item)
|
||||
{
|
||||
item.type = Item::item_ifanyno;
|
||||
|
||||
@@ -716,7 +635,7 @@ void Pattern::ReadDirectiveIfanyno(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIfoneno(Item & item)
|
||||
void PatternParser::ReadDirectiveIfoneno(Item & item)
|
||||
{
|
||||
item.type = Item::item_ifoneno;
|
||||
|
||||
@@ -726,7 +645,7 @@ void Pattern::ReadDirectiveIfoneno(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIs(Item & item)
|
||||
void PatternParser::ReadDirectiveIs(Item & item)
|
||||
{
|
||||
item.type = Item::item_is;
|
||||
ReadFunctions(item);
|
||||
@@ -737,7 +656,7 @@ void Pattern::ReadDirectiveIs(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIsno(Item & item)
|
||||
void PatternParser::ReadDirectiveIsno(Item & item)
|
||||
{
|
||||
item.type = Item::item_isno;
|
||||
ReadFunctions(item);
|
||||
@@ -748,7 +667,7 @@ void Pattern::ReadDirectiveIsno(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveIfindex(Item & item)
|
||||
void PatternParser::ReadDirectiveIfindex(Item & item)
|
||||
{
|
||||
item.type = Item::item_err;
|
||||
item.functions.clear();
|
||||
@@ -768,7 +687,7 @@ void Pattern::ReadDirectiveIfindex(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveFor(Item & item)
|
||||
void PatternParser::ReadDirectiveFor(Item & item)
|
||||
{
|
||||
item.type = Item::item_for;
|
||||
ReadFunctions(item);
|
||||
@@ -779,7 +698,7 @@ void Pattern::ReadDirectiveFor(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveComment(Item & item)
|
||||
void PatternParser::ReadDirectiveComment(Item & item)
|
||||
{
|
||||
item.type = Item::item_comment;
|
||||
|
||||
@@ -790,7 +709,7 @@ void Pattern::ReadDirectiveComment(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveInclude(Item & item)
|
||||
void PatternParser::ReadDirectiveInclude(Item & item)
|
||||
{
|
||||
if( ReadString(item.file_name) )
|
||||
item.type = Item::item_include;
|
||||
@@ -800,7 +719,7 @@ void Pattern::ReadDirectiveInclude(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveDef(Item & item)
|
||||
void PatternParser::ReadDirectiveDef(Item & item)
|
||||
{
|
||||
item.type = Item::item_err;
|
||||
ReadFunctions(item);
|
||||
@@ -827,7 +746,7 @@ void Pattern::ReadDirectiveDef(Item & item)
|
||||
}
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveFilter(Item & item)
|
||||
void PatternParser::ReadDirectiveFilter(Item & item)
|
||||
{
|
||||
item.type = Item::item_filter;
|
||||
ReadFunctions(item);
|
||||
@@ -837,7 +756,7 @@ void Pattern::ReadDirectiveFilter(Item & item)
|
||||
}
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveEzc(Item & item)
|
||||
void PatternParser::ReadDirectiveEzc(Item & item)
|
||||
{
|
||||
item.type = Item::item_ezc;
|
||||
ReadFunctions(item);
|
||||
@@ -846,7 +765,7 @@ void Pattern::ReadDirectiveEzc(Item & item)
|
||||
|
||||
|
||||
// user defined directive
|
||||
void Pattern::ReadDirectiveNormal(const std::wstring & name, Item & item)
|
||||
void PatternParser::ReadDirectiveNormal(const std::wstring & name, Item & item)
|
||||
{
|
||||
temp_function.name = name;
|
||||
ReadParams(temp_function);
|
||||
@@ -857,7 +776,7 @@ void Pattern::ReadDirectiveNormal(const std::wstring & name, Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTreeReadItemDirective(Item & item)
|
||||
void PatternParser::CreateTreeReadItemDirective(Item & item)
|
||||
{
|
||||
std::wstring name;
|
||||
|
||||
@@ -889,7 +808,7 @@ std::wstring name;
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTreeReadItemText(Item & item)
|
||||
void PatternParser::CreateTreeReadItemText(Item & item)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -904,7 +823,7 @@ int c;
|
||||
|
||||
|
||||
|
||||
bool Pattern::CreateTreeReadItem(Item & item)
|
||||
bool PatternParser::CreateTreeReadItem(Item & item)
|
||||
{
|
||||
item.Clear();
|
||||
|
||||
@@ -928,7 +847,7 @@ return false;
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTreeReadInclude(Item & item)
|
||||
void PatternParser::CreateTreeReadInclude(Item & item)
|
||||
{
|
||||
if( !allow_include )
|
||||
return;
|
||||
@@ -939,7 +858,7 @@ void Pattern::CreateTreeReadInclude(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTreeReadIncludeSkipAllowFlag(Item & item)
|
||||
void PatternParser::CreateTreeReadIncludeSkipAllowFlag(Item & item)
|
||||
{
|
||||
if( item.file_name.empty() )
|
||||
return;
|
||||
@@ -966,7 +885,7 @@ void Pattern::CreateTreeReadIncludeSkipAllowFlag(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTreeReadIf(Item & item)
|
||||
void PatternParser::CreateTreeReadIf(Item & item)
|
||||
{
|
||||
Item * pitem = item.AddItem();
|
||||
CreateTree(*pitem);
|
||||
@@ -985,7 +904,7 @@ void Pattern::CreateTreeReadIf(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTreeReadFor(Item & item)
|
||||
void PatternParser::CreateTreeReadFor(Item & item)
|
||||
{
|
||||
Item * pitem = item.AddItem();
|
||||
CreateTree(*pitem);
|
||||
@@ -996,7 +915,7 @@ void Pattern::CreateTreeReadFor(Item & item)
|
||||
|
||||
|
||||
|
||||
void Pattern::CreateTree(Item & item)
|
||||
void PatternParser::CreateTree(Item & item)
|
||||
{
|
||||
item.Clear();
|
||||
item.type = Item::item_container;
|
||||
|
Reference in New Issue
Block a user