2005/5/10

     
 

CfgScript Syntax Elements

artefaktur

| Syntax Elements | Source | Preprocessor | Types | Expressions | Backtick Expressions | Statements | Class | Logging |

Explanation of Sytanx


Content of this chapter:

   Starting Point
   Syntax of Syntax
   Basic Elements
     Identifier
     TypeName
     ComponentTypeName
     Identifier



 Starting Point

The syntax of CfgScript starts with a CfgScource:
 Source.

 Syntax of Syntax

The syntax follows the rules of the EBNF notation.
Rule // name of Rule
: Production // how to produce this rule
| AlternativeProduction // alternative production
; // end of rule

Rule
: '[' ']' // ' quoted strings must match in the source text
| OtherRule // Identifier reference to other rule
| FirstRule SecondRule // FirstRule has to match first, than SecondRule. 
                      // Both may consume Characters of the source code
;

Rule
: [ OptionalRule ] OtherRule // parts bracket with [ ] are optional
| (XRule YRule)* // ( ) groups rules, * matches 0 - n times
| ZRule+ // + matches 1 - n times
;


 Basic Elements


 Identifier

An identifier corresponds the rules of C/C++/Java identifiers.
An identifier must not start with a digit.


 TypeName

TypeName
:  BasicType
|  ComponentTypeName


 ComponentTypeName

ComponentTypeName
:  Identifier [ '.' ComponentTypeName ]

 Identifier

Please refer to  Literals.