Toupl is a multi target language simplified generic template engine
Template engine
A template engine is software that is designed to process web templates and content information to produce output web documents. It runs in the context of a template system.-Types:...
In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers...
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...
. Syntax based on Foobar 2000 Tagz Script, but modified and extended for template engine
Template engine
A template engine is software that is designed to process web templates and content information to produce output web documents. It runs in the context of a template system.-Types:...
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....
ECMAScript is the scripting language standardized by Ecma International in the ECMA-262 specification and ISO/IEC 16262. The language is widely used for client-side scripting on the web, in the form of several well-known dialects such as JavaScript, JScript, and ActionScript.- History :JavaScript...
Lua may refer to:* Lua , a Roman goddess* Lua , a traditional Hawaiian martial art* Lua , a lightweight, extensible programming language* Lua , a single by the folk rock band Bright Eyes...
PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document...
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...
.
Syntax
Text may be simply outputted as is.
Hello world!
This are no other operator except variable\expression output, condition variable\expression output and target language code include. Other operators such as forwhile etc. must be written in terms of target language operators.
Target language target language variable or expression can be outputted by enclosing in %% tags
Variable var0 is equivalent %var0%
1+2=%1+2%
Target language code can be included by enclosing in ?%%? tags
?%
int i;
int n=100;
while(i
{
%?%i*i% ?%
++i;
}
%?
Native condition output must by following construction
?%
var _genImage=function(src,alt,width,height)
{
%?
?%
return fpText;
}
%?
Conditional text putted between [%%] tags and will be outputted if all condition variables inside not null.
Conditional variables same as ordinary variables but enclosing by &%%& instead %%.
As in any language - there is a own comments
/%
block comment
%/
//% line comment
In situation, when you need output text, that contains elements\tags of toupl,you can enclose this in special ignore tags !%%!
!% all /% this % text ?% outputted %]
even !% you can output %!
!% if you want to output %!%! - simply twice is %!