Log of /ezc/trunk/src/patternparser.cpp
Parent Directory
|
Revision Log
Revision
1139 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 1 21:52:33 2018 UTC
(4 years, 4 months ago)
by
tomek
File length: 20516 byte(s)
Diff to
previous 1136
fixed: program_mode was not set in cctor
fixed: container was not correctly parsed (in template mode)
Revision
1134 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 29 23:50:10 2018 UTC
(4 years, 4 months ago)
by
tomek
File length: 20485 byte(s)
Diff to
previous 1041
start working on a 'program mode'
a new syntax for simple scripting
Revision
1041 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 25 13:11:33 2016 UTC
(6 years, 6 months ago)
by
tomek
File length: 17855 byte(s)
Diff to
previous 1038
changed: in PatternParser: the way how nested ezc funcions are parsed
now we can have: [fun] [[fun]] or even [[[fun]]]
also when using keywords: [if fun] [if [fun]] or [if [[[[fun]]]]]
Revision
1038 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 4 15:53:11 2016 UTC
(6 years, 11 months ago)
by
tomek
File length: 17952 byte(s)
Diff to
previous 1016
changed: a function can have a postfix now e.g. [my_function:my_postfix]
this will be mainly used in conjuction with [for ...] statements
[for my_function:xxx]
[for my_function]
[my_function_value]
[my_function_valu:xxx] (references the first loop)
[end]
[end]
added: to FunInfo<>: a reference to current item from a pattern (const Item & item)
similary on the stack is added a pointer to an item
by having this reference you can compare a function's name and its postfix
added methods:
Stack * FindLastFor(const std::wstring & name);
Stack * FindLastFor(const std::wstring & name, const std::wstring & postfix);
template<class FunUserObject> FunUserObject * FindUserObject(const std::wstring & function_name, Stack ** ezc_stack = 0);
Revision
1014 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 12 09:53:20 2015 UTC
(7 years, 4 months ago)
by
tomek
File length: 17797 byte(s)
Diff to
previous 1004
changed: [ezc streams "..."] to [ezc out "..."] or just [out "..."]
the syntax has been changed, now [ezc ...] is used with [end] statement
added: OutStreams<StreamType> class with a pool with output streams,
the Generator::Generate() method can take it as its argument
(Generator API has been changed)
Revision
1004 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 8 02:31:21 2015 UTC
(8 years ago)
by
tomek
File length: 17358 byte(s)
Diff to
previous 988
changed: the way how functions' arguments are parsed
now this [fun1 fun2 "something" fun3]
will call fun1 with three arguments: fun2, "something" and fun3
and this [fun1 [fun2 "something"] fun3]
will call fun1 with two arguments: [fun2 "something] and fun3
"something" is an argument for fun2 function
removed: statements: [if-one] [if-any] [if-no] [if-any-no] [if-one-no]
Revision
988 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Sun Nov 2 17:26:56 2014 UTC
(8 years, 4 months ago)
by
tomek
File length: 18416 byte(s)
Diff to
previous 987
removed: statements: [if-index ...] [is ...] and [is-no ...]
we can provide a user definied function which does the same
added: to FunInfo<>:
Stack * stack_tab
size_t stack_index
a stack table and an index to the current stack item
Revision
981 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 28 17:46:24 2014 UTC
(8 years, 4 months ago)
by
tomek
File length: 19522 byte(s)
Diff to
previous 975
added: [return ...] statement for a block
changed: a user definied function now is able to get a string and a boolean value (parameters)
changed: we do not longer support aliases for variables
a variable is only a string and a boolean value now
Revision
975 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Sun Oct 19 05:42:25 2014 UTC
(8 years, 5 months ago)
by
tomek
File length: 19282 byte(s)
Diff to
previous 971
changed: SetCommentary() methods from Pattern were moved to PatternParser and Generator
added: caching functions and blocks
caching is added into Pattern and Blocks
methods: CacheFunctions() and CacheBlocks()
Revision
971 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 17 21:48:11 2014 UTC
(8 years, 5 months ago)
by
tomek
File length: 18371 byte(s)
Diff to
previous 970
changed: a header info in each source file to:
* This file is a part of EZC -- Easy templating in C++ library
* and is distributed under the BSD 3-Clause licence.
Revision
970 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 17 21:36:55 2014 UTC
(8 years, 5 months ago)
by
tomek
File length: 18360 byte(s)
Diff to
previous 969
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
Revision
969 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Sat Oct 11 19:56:48 2014 UTC
(8 years, 5 months ago)
by
tomek
File length: 17209 byte(s)
Diff to
previous 968
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
Revision
445 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 7 10:16:10 2013 UTC
(9 years, 4 months ago)
by
tomek
Original Path:
ezc/trunk/src/pattern.cpp
File length: 17769 byte(s)
Diff to
previous 372
added: possibility to generate output to more than one stream
Generate() methods can take std::vector with pointers to streams
added: 'ezc' keyword -- currently only for selecting streams
e.g.
[ezc stream "0" "3"] - after now the output is generated to streams 0 and 3
Revision
333 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 26 12:42:49 2011 UTC
(12 years, 1 month ago)
by
tomek
Original Path:
ezc/trunk/src/pattern.cpp
File length: 17564 byte(s)
Diff to
previous 331
added filters:
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
Revision
331 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 14 23:59:30 2011 UTC
(12 years, 2 months ago)
by
tomek
Original Path:
ezc/trunk/src/pattern.cpp
File length: 17293 byte(s)
Diff to
previous 330
changed: now [for] statements with the same function can be nested
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
Revision
329 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 25 22:39:58 2010 UTC
(12 years, 3 months ago)
by
tomek
Original Path:
ezc/trunk/src/pattern.cpp
File length: 17411 byte(s)
Diff to
previous 327
added: Pattern::CacheFunctions(Functions<StreamType> & fun)
you can cache all functions (their addresses) in the pattern
changed: now we have two methods for generating content:
Generator<>::Generate(StreamType & o, Pattern & p, Functions<StreamType> & f);
similar like previous -- Set(...) methods were removed as well as the second ctor
and a second one:
Generate(StreamType & o, Pattern & p);
without functions, the functions should be cached beforehand in the pattern
by calling CacheFunctions() method on the pattern
this gives O(1) complexity when looking for a specific function
previously was O(log n)
Revision
327 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 23 21:59:52 2010 UTC
(12 years, 4 months ago)
by
tomek
Original Path:
ezc/trunk/src/pattern.cpp
File length: 17301 byte(s)
Diff to
previous 326
fixed: performance (memcpy used too often)
in some places there were reserve() method used (on std::wstring/std::string objects)
especially in AssignString() methods
if we add a new string we should check the new size
and only call reserve() if the new size will be greater than existing one
(plus some constant)
added: Functions<>::Size() method
Revision
326 -
(
view)
(
annotate)
-
[select for diffs]
Added
Mon Nov 22 01:23:32 2010 UTC
(12 years, 4 months ago)
by
tomek
Original Path:
ezc/trunk/src/pattern.cpp
File length: 17301 byte(s)
added: support for UTF-8 (files utf8.h utf8.cpp)
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
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.