|
Generate a dictionary of values that describe the stream. These
may be extended by subclasses. They are provided to
syntax_error_kargs, for example.
prefix modifies the property names
kargs allows values to be provided. These are not overwritten,
so if there is a name clash the provided value remains.
Note: Calculating this can be expensive; use only for error messages,
not debug messages (that may be discarded).
The following names will be defined (at a minimum).
For these value the "global" prefix indicates the underlying stream
when, for example, tokens are used (other values will be relative to
the token). If tokens etc are not in use then global and non-global
values will agree.
- data: a line representing the data, highlighting the current offset
- global_data: as data, but for the entire sequence
- text: as data, but without a "[...]" at the end
- global_text: as text, but for the entire sequence
- type: the type of the sequence
- global_type: the type of the entire sequence
- global_offset: a 0-based index into the underlying sequence
These values are always local:
- offset: a 0-based index into the sequence
- rest: the data following the current point
- repr: the current value, or <EOS>
- str: the current value, or an empty string
These values are always global:
- filename: a filename, if available, or the type
- lineno: a 1-based line number for the current offset
- char: a 1-based character count within the line for the current offset
- location: a summary of the current location
|