they can be even used without the rest library
as only a library for converting between wide characters and UTF-8
changed: everywhere we use std::wstring instead of std::string
changed: Generator and Functions are templates now
they take a stream type
renamed: Info to FunInfo and it is a template too
taking a stream type
now you can use other kind of streams with the library
previous was only std::ostringstream
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@326 e52654a7-88a9-db11-a3e9-0013d4bc506e
void RecognizeSpecialChars(bool spec);
recognizing some special characters in text patterns (item_text in Patterns)
\r will be a carriage return (13)
\n will be a new line (10)
\t will be a tabulator (9)
\s will be a space
\\ will be one '\'
default: false
void TrimWhite(bool trim);
trimming white characters (at the beginning and at the end of an item_text)
(special char \s if enabled is not treated as a white character here)
default: false
void SkipNewLine(bool skip);
skipping new line characters (from the whole string in an item_text)
but you can use a new line character written as "\n" (if special chars are turn on)
default: false
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@305 e52654a7-88a9-db11-a3e9-0013d4bc506e
now it is allowed to use a slash (we can use directories)
only ".." is not allowed (you cannot go up in a directory structure)
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@299 e52654a7-88a9-db11-a3e9-0013d4bc506e
functions can have more than one parameter and the parameters can be used in [if...] statements too
sample:
[normal_function "par1" "par2" "par3"]
[if-one function "par1" "par2" "par3"]...[end]
each function can have its own parameters:
[if-one function1 "par1" "par2" "par3" function2 "par" "par2"]...[end]
changed:
[is] is now [if] (not exactly but very similar)
[is-no] is now [if-no] (the same)
[if] and [if-no] are taking one function (with or without arguments)
sample:
[if function]...[end]
[if function "par1"]...[end]
[if function "par1" "par2" "par3" "par4"]...[end]
[is] is taking two functions now and evaluates them to boolean value
(variables are also evaluated to boolean - if not empty that means true)
[is function1 function2]...[end]
[is variable1 variable2] either variable1 and variable2 are empty or both are not empty
(they don't have to be equal)[end]
added:
[if-any-no fun1 fun2 fun3] the three functions have to return false [end]
[if-one-no fun1 fun2 fun3] one the the three functions have to return false [end]
removed:
extracting the unix directory from the file name (in patterns)
you have to call Pattern::Directory() method first to set directories
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@298 e52654a7-88a9-db11-a3e9-0013d4bc506e
parameters to "for" statement [for function "parameter"]
changed: in Info struct there is a "par" std::string reference now
changed: Info::result to Info::res
removed: Info::is
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@295 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: ezc can use the logger from winix
added: we check how many [include] directive was called
(if more than 100 then we break - supposing infinite loop)
added: in Pattern we read from two directories
if a file is not in the first directory then we try to read
from the other one
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@292 e52654a7-88a9-db11-a3e9-0013d4bc506e
if true all text-items which have only white characters (with new lines as well)
will be deleted
this not actually delete the whole item but only the string
the item will be present with an empty string
default: false
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@260 e52654a7-88a9-db11-a3e9-0013d4bc506e
if false there is no allowed [include ...] directive
(this directive will be skipped)
added: Pattern::ParseString(const std::string & str);
Pattern::ParseString(const char * str);
can create the pattern from a string
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@94 e52654a7-88a9-db11-a3e9-0013d4bc506e
if fun1 fun2 ... return false
then the content is evaluated
changed: [if-one fun1 fun2 ...]
when a function (from left to right) returns true
then the content is evaluated
(previous all functions were called)
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@91 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: class Functions, you can define your own set of functions and then
put them into the Generator
added: variables
parser is able to parse the "def" directive:
[def variable "value"]
[def variable another_variable]
[def variable another_function]
variables are put into a Functions object
added: class Info has a reference to std::ostringstream (out)
added: limit for a "for" directive
limit for the whole tree (when genereting)
this is to protect for a case when someone makes an infinite loop
changed: many small changes
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@88 e52654a7-88a9-db11-a3e9-0013d4bc506e
it's possible to give the path into the working directory in the Pattern::ParseFile(...) without using the Pattern::Directory(...)
added [#] (commentary)
[include] now can open a file only in a specific directory
git-svn-id: svn://ttmath.org/publicrep/cgi/ezc/trunk@9 e52654a7-88a9-db11-a3e9-0013d4bc506e
* Ezc is now a namespace
* added Ezc::Pattern
* added Ezc::Generator
added [if-one]
fixed a problem with memory lack
git-svn-id: svn://ttmath.org/publicrep/cgi/ezc/trunk@7 e52654a7-88a9-db11-a3e9-0013d4bc506e
Ezc::CreateTree takes a name of an input file
added [for ...]
added [if-index ...]
added [is ....]
added [include...] (not all finished)
git-svn-id: svn://ttmath.org/publicrep/cgi/ezc/trunk@6 e52654a7-88a9-db11-a3e9-0013d4bc506e
EzcInfo pushed into Ezc::
added info about a wrong directive
git-svn-id: svn://ttmath.org/publicrep/cgi/ezc/trunk@5 e52654a7-88a9-db11-a3e9-0013d4bc506e