Welcome Guest, Not a member yet? Register   Sign In
ClassFormerlyKnownAsTemplateParser
#7

I don't recommend Lex engine or a clone of it. Here are my arguments:

1. It is based on regular expressions, some of them are greedy. An engine that uses a tokenizer would be precise, controllable and faster.

2. The syntax is verbose and it has a significant limitation about calling nested functions. Sometimes arguments (tag attributes) should be in certain order, especially under the helper tag. For other tags you should memorize specific attribute names for every argument.

3. The Lex syntax that was on PyroCMS is extended in a dirty way in an attempt to deal with the syntax limitations.

4. There is complicated logic about {{ noparse }} tag.

5. It does not support well non-scalar data in some valid cases. I fixed this by using serialization internally.

6. It is likely not supported anymore. There are some bugs that I fixed alone. The newer PyroCMS dumps Lex in favor of Twig.

7. There is no automatic html-escaping by default.

8. There is no caching of compiled templates (because it works with regular expressions, again).

I have integration of Lex http://iridadesign.com/starter-public-ed...ry_param_2 , because I was asked to implement it. But I honestly advice you, don't go there.
Reply


Messages In This Thread
ClassFormerlyKnownAsTemplateParser - by jlp - 07-20-2016, 12:09 AM
RE: ClassFormerlyKnownAsTemplateParser - by jlp - 07-20-2016, 01:01 AM
RE: ClassFormerlyKnownAsTemplateParser - by ivantcholakov - 07-21-2016, 06:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB