Startrule: guard

Top  Previous  Next

Examples > Guard > Startrule: guard

 

The start rule of the program has the name of the project: guard. It shall be able, to process a complete c++ source file, produced by TETRA:

 

(

SKIP                {{ out << xState.copy(); }}

| constructor

| destructor

| member_function

| global_declaration  {{ out << xState.lp_copy(); }}

| LINE_COMMENT        {{ out << xState.copy(); }}

| PREPROCESSED        {{ out << xState.copy(); }}

| USING               {{ out << xState.copy(); }}

)+

 

The names of the alternative productions, which can be called inside of the loop, denote the structures, which shall be recognized by the productions. So the c++ source consists of constructors, destructors member functions, comments, lines, which are processed by the preprocessor, using directives and an undefined rest, which will be recognized by the SKIP symbol.

The constructors, destructors and member functions shall be instrumented by "guards". The other parts of the source code shall be copied without change.

 



This page belongs to the TextTransformer Documentation

Home  Content  German