added: possibility to define a block
changed: in Functions
Functions are only for user-defined functions now
(before they could remember a string variable too)
added: class Vars for variables
a variable can be a string or an alias to an other function or block
added: now we can have nested functions calls e.g.:
[function1 [function2]]
in the above example an output (stream) from function2 will be passed
as the first argument to funcion1 (will be passed as a string)
removed: UTF8() method from PatternParser
now it is treated that when we have only std::string (or char*)
that this is an UTF-8 string
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@970 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
+8
-9
@@ -39,8 +39,8 @@
|
||||
#ifndef headerfile_ezc_patternparser
|
||||
#define headerfile_ezc_patternparser
|
||||
|
||||
#include "blocks.h"
|
||||
#include "pattern.h"
|
||||
#include "stringconv.h"
|
||||
#include "utf8/utf8.h"
|
||||
|
||||
#ifdef EZC_USE_WINIX_LOGGER
|
||||
@@ -83,11 +83,7 @@ public:
|
||||
void DeleteWhiteTextItems(bool del);
|
||||
void SetIncludeMax(int include_max);
|
||||
|
||||
// files and strings (only char* and std::string) are treated
|
||||
// as UTF-8
|
||||
void UTF8(bool utf8);
|
||||
|
||||
|
||||
void SetBlocks(Blocks & blocks);
|
||||
|
||||
private:
|
||||
|
||||
@@ -114,8 +110,7 @@ private:
|
||||
// we read from these directories only if they are not empty
|
||||
std::wstring directory, directory2;
|
||||
|
||||
|
||||
bool input_as_utf8;
|
||||
|
||||
|
||||
int include_level, include_level_max;
|
||||
|
||||
@@ -135,6 +130,7 @@ private:
|
||||
// temporary object for a EZC function
|
||||
Item::Function temp_function;
|
||||
|
||||
Blocks * pblocks;
|
||||
|
||||
|
||||
void ReadFile(const std::wstring & name, std::wstring & result);
|
||||
@@ -143,7 +139,6 @@ private:
|
||||
bool IsFileCorrect(const wchar_t * name);
|
||||
bool ReadFileFromDir(const std::wstring & dir, const wchar_t * name, std::wstring & result);
|
||||
void ReadFile(std::ifstream & file, std::wstring & result);
|
||||
void ReadFileContent(std::ifstream & file, std::wstring & result);
|
||||
|
||||
int ReadCharInText();
|
||||
bool IsWhite(wchar_t c);
|
||||
@@ -168,6 +163,8 @@ private:
|
||||
void ReadDirectiveIfoneno(Item & item);
|
||||
void ReadDirectiveIs(Item & item);
|
||||
void ReadDirectiveIsno(Item & item);
|
||||
void ReadDirectiveEnd(Item & item);
|
||||
void ReadDirectiveElse(Item & item);
|
||||
void ReadDirectiveIfindex(Item & item);
|
||||
void ReadDirectiveFor(Item & item);
|
||||
void ReadDirectiveComment(Item & item);
|
||||
@@ -175,6 +172,7 @@ private:
|
||||
void ReadDirectiveDef(Item & item);
|
||||
void ReadDirectiveFilter(Item & item);
|
||||
void ReadDirectiveEzc(Item & item);
|
||||
void ReadDirectiveBlock(Item & item);
|
||||
void ReadDirectiveNormal(const std::wstring & name, Item & item);
|
||||
|
||||
void CreateTreeReadItemDirectiveCheckEnding(Item & item);
|
||||
@@ -182,6 +180,7 @@ private:
|
||||
void CreateTreeReadItemText(Item & item);
|
||||
bool CreateTreeReadItem(Item & item);
|
||||
void CreateTreeReadIf(Item & item);
|
||||
void CreateTreeReadBlock(Item & item);
|
||||
void CreateTreeReadFor(Item & item);
|
||||
void CreateTree(Item & item);
|
||||
void CreateTreeReadInclude(Item & item);
|
||||
|
||||
Reference in New Issue
Block a user