Productions

Top  Previous  Next

Examples > Cocor import > Productions

 

Coco/R uses the EBNF syntax and some special symbols to define productions. EBNF means "Enhanced Backus-Naur-Form". This syntax in essence accomplishes the same as the regular expressions of the TextTransformer. Instead for example of the bracketing of a repeat "(...)*" a pair of braces "{...}" is used. Analog other bracketing has to be exchanged:

 

 

Coco/R

TETRA

[...]

(...)?

{...}

(...)*

(. ... .)

{_ ... _}

<...>

[...]

 

 

The ANY symbol of Coco/R can be replaced provisional by the SKIP symbol. But the correctness of this replacement can't be guaranteed automatically. It must be checked for each single case.

For the WEAK and the SYNC symbol of Coco/R, there is no corresponding symbol in the TextTransformer. They can be omitted, because they don't have a meaning for the parsing directly, but only for the treatment of parser errors.  

 

 



This page belongs to the TextTransformer Documentation

Home  Content  German