[if-index] statement has to look for a last [for] statement on the stack
(because the stack is for all items now)
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@394 e52654a7-88a9-db11-a3e9-0013d4bc506e
now we have a stack item for all statements [if...] [normal_fun] etc.
previously was only for [for ...] statements
changed: FunInfo<> has a pointer to the current stack item
changed: now we have a static number of stack items (default: 300)
so you can remember a pointer to a stack item and this pointer
is always valid
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@393 e52654a7-88a9-db11-a3e9-0013d4bc506e
bool remove_fun_data
fun_data is removed only when remove_fun_data is true (default)
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@392 e52654a7-88a9-db11-a3e9-0013d4bc506e
now we have a pointer to FunData struct
by default the pointer is null
you can create an object of a class derived from FunData
an set the pointer to the object
those pointers will be kept on the [for] stack
and will be auto removed
(not finished yet -- need some testing)
added: to FunInfo<>::
bool is_if;
bool is_is;
bool is_normal;
bool is_filter;
removed: from FunInfo<>:
bool is_for_first_iter;
changed: in FunInfo<>:
int iter -> size_t iter
now it indicates the number of a current iteration for the [for] statement
for other statements than [for] this is always zero
(the same old behaviour as before revision 331)
added: in FunInfo<>:
size_t last_iter
it indicates the number of a previous [for] iteration
for a [for] it returns not the current iterator but a value from a previous [for]
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@391 e52654a7-88a9-db11-a3e9-0013d4bc506e
// indicates that this function is from [for ...] statement
bool is_for;
// indicates that this function is from [for ...] statement
// and this is a first iteration (iter=0 too)
// this is only for convenience -- you don't have to check is_for and iter==0
bool is_for_first_iter;
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@380 e52654a7-88a9-db11-a3e9-0013d4bc506e
previously they used FunInfo::res, now they use FunInfo::out
and the out string is not put to the main output stream
added: FunInfo<>::case_sensitive (default true)
when false then [is] statement is comparing in case insensitive manner
changed: the out stream in [if...] [for] statements
the output text is ingored now
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@344 e52654a7-88a9-db11-a3e9-0013d4bc506e
a new statement [filter]
syntax:
[filter funcion_name]....[end]
everything which is between [filter] and [end] is processed normally and
at the end it is passed to the function (function_name)
FunInfo struct has 'in' input stream now
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@333 e52654a7-88a9-db11-a3e9-0013d4bc506e
sample:
[for my_function]
[for my_function]
foo
[end]
[end]
changed: FunInfo::iter has a value from the last [for] statement now
sample:
[for my_function]
[other_function]
[end]
void other_function(Info &i)
{
// here i.iter is the number of iteration
// previously was always zero
}
changed: small optimization in [for]
the proper function is being looking for only once at the beginning
previously it was searched in each iteration
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@331 e52654a7-88a9-db11-a3e9-0013d4bc506e
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