Most essential syntax elements

Top  Previous  Next

 

Parser and Scanner

 

Grouping

(...)

Alternative

|

Option

?

Optional repeat

*

Repeat

+

 

Arguments are passed to productions or tokens inside of brackets '[' and ']', which follow the name of the production of token; e.g. Name[ iCount ]

 

 

Interpreter

 

 

The syntax of the interpreter is simple c++ syntax.

 

Tip: Write simple code and better use two instructions than one.

 

C++ code is inserted into the parser description inside of special brackets:

 

only executable in the interpreter

{- ... -}

only for the c++ export

{_ ... _}

for interpreter and export

{= ... =}

according to project options

{{ ... }}

 

 

Frequently used instructions or expressions are:

 

 

Writing into the output

out << value;

last recognized text

State.str()

ignored characters before

State.str( -1 )

last recognized text, ignored characters before inclusive

State.copy()

 

 

 

 



This page belongs to the TextTransformer Documentation

Home  Content  German