Next: , Previous: , Up: Procedural Language Interpreter Types   [Index]


6.14.2.2 struct x1f4_a1record_type

typedef struct x1f4_a1record_type {
    struct {
	int (*rule)(void *, unsigned, unsigned);
	void *data;
    } hint;
    union {
        ...
    } data;
    unsigned code, pick;
} x1f4_a1record_type;

The struct x1f4_a1record_type record records program parse errors.

Most of the fields are set by the parser when recording parsing errors. Some are to be set by the application to refine the error report. As such, these fields only need to be set before formatting the error report.

The fields the application needs to set are:

pick

selects the first line index. The error report formatter may display a line number indicative of the location of the parse error. It will add to value of this field to the computed line number, its own count starting from zero. The application will set pick to N to have the first line identified as N.

Fields set by the application and used only on explicit request are:

See Procedural Language Interpreter Error Formatter Hints.

See x1f4_lame_shuffle.

hint

describes the source location formatter as:

data

the source location formatter context, passed as argument to the source location formatting method and not interpreted further

rule

the source location formatting method. Called to display the source location and passed the source location formatter context, the first line index and the source byte offset as arguments, in this order. It is expected to display the source location as a line or a file/line indication, indication to be derived from the source byte offset.

The fields the parser sets include:

code

The code field indicates the syntax error that prevented successful program parsing. It is set to set to one of parse error definitions.

See Procedural Program Parsing Error Reporting.


Next: struct x1f4_a1screen_type, Previous: struct x1f4_a1_type, Up: Procedural Language Interpreter Types   [Index]