Torero Compatibility

Input (yacc grammar) file compatibility

In Version b0.9 of Torero there are some restrictions on yacc grammars.
Torero always does a "best effort" import of the supplied yacc-grammars, if some parts of the input code are not supported by Torero it tries to ignore them and displays a log-window after importing a grammar, which contains info messages about the ignored code.
Torero does not make the same syntactic checks on grammars as yacc does. It is absolutely necessary that the input files conform to yacc's syntax, otherwise there could be situations where Torero will not accept the input grammar and won't display useful error messages.

Yacc input syntax, with comments.

 

Output (ox attribute grammar) file compatibility

How Torero handels types (C-types) of attributes

Types of attributes cannot be specified in Torero directly, therefore the generated ox-file includes a headerfile where the user has to place the appropriate type definitions. The type names for attributes used by Torero are a simple extension of the attributes' names with a leading "T_", as shown below.



%{
#include "attribute_types.h"
%}

@attributes { T_VAL val; } S 
@attributes { T_Q q; T_VAL val; } L 
@attributes { T_VAL val; } B 
 

All type names with the leading "T_" have to be defined by the user in the headerfile with the name "attribute_types.h". An example is shown below.

#define T_VAL	float
#define T_Q	float

Compatibility of different versions of Torero

Attribute grammars (.trr, .torero - files) saved with version b0.8 are not compatible to version b0.9 (and vice versa) because Torero (at this time) uses serialized JAVA object for saving and loading. There may also be problems when Torero is compiled using different JDK versions, so it's suggested to use the torero.jar files provided in the download section.

 

Torero Reference
Torero Home
Menu Description