Commit Graph

17 Commits

Author SHA1 Message Date
Tomasz Sowa 1e85922d4e changed: PatternParser now uses Log from pikotools
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1153 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-23 18:33:17 +00:00
Tomasz Sowa bf62d44346 fixed: program_mode was not set in cctor
fixed: container was not correctly parsed (in template mode)




git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1139 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-01 21:52:33 +00:00
Tomasz Sowa a6b767a223 some work on a 'program mode'
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1136 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-10-30 20:59:17 +00:00
Tomasz Sowa c825c85878 start working on a 'program mode'
a new syntax for simple scripting



git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1134 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-10-29 23:50:10 +00:00
Tomasz Sowa eace4d41cc 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]]]]]




git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1041 e52654a7-88a9-db11-a3e9-0013d4bc506e
2016-08-25 13:11:33 +00:00
Tomasz Sowa 363605bde5 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);




git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1038 e52654a7-88a9-db11-a3e9-0013d4bc506e
2016-04-04 15:53:11 +00:00
Tomasz Sowa 0dc807dbff some #include moved in other places
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1016 e52654a7-88a9-db11-a3e9-0013d4bc506e
2015-11-15 21:45:49 +00:00
Tomasz Sowa 7b6f7ad328 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)



git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1014 e52654a7-88a9-db11-a3e9-0013d4bc506e
2015-11-12 09:53:20 +00:00
Tomasz Sowa 6b42cdf76e 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]



git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1004 e52654a7-88a9-db11-a3e9-0013d4bc506e
2015-03-08 02:31:21 +00:00
Tomasz Sowa b519c79a3e 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



git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@988 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-11-02 17:26:56 +00:00
Tomasz Sowa 6f1e2eb518 removed: svn:executable atribute from files
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@987 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-11-01 17:14:39 +00:00
Tomasz Sowa 0a7bd3159a 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



git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@981 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-28 17:46:24 +00:00
Tomasz Sowa 2fca5f3492 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()
		 




git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@975 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-19 05:42:25 +00:00
Tomasz Sowa 429021f687 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.




git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@971 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-17 21:48:11 +00:00
Tomasz Sowa 71c5bd11d5 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
2014-10-17 21:36:55 +00:00
Tomasz Sowa b5faf171e3 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
2014-10-11 19:56:48 +00:00
Tomasz Sowa fd75a1f119 copied: pattern.cpp -> patternparser.cpp
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@968 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-11 19:01:17 +00:00