A step to child i
of the current node, counting from zero.
A step to child i
of the current node, counting from zero.
Dependence record saying that the source attribute depends on
attribute
of a node with type type
that is the given step away.
Dependence record saying that the source attribute depends on
attribute
of a node with type type
that is the given step away.
A single step in the evaluation of an attribute.
A single step in the evaluation of an attribute.
Create the configuration for a particular run of the compiler.
Create the configuration for a particular run of the compiler. Override this if you have a custom configuration for your compiler.
Format an abstract syntax tree for printing.
Format an abstract syntax tree for printing. Default: return an empty document.
Make the contents of the given source, returning the AST wrapped in Left
.
Make the contents of the given source, returning the AST wrapped in Left
.
Return Right
with messages if an AST cannot be made. config
provides
access to all aspects of the configuration.
Function to process the input that was parsed.
Function to process the input that was parsed. source
is the input
text processed by the compiler. ast
is the abstract syntax tree
produced by the parser from that text. config
provides access to all
aspects of the configuration.
A step to the previous node in a sequence.
A step to the previous node in a sequence.
A step to a node that doesn't fit into any of the other categories.
A step to a node that doesn't fit into any of the other categories. This category will be used for nodes that were obtained as the result of reference attributes or as values that sit outside the main tree.
A step to the parent of the current node.
A step to the parent of the current node.
A step to the previous node in a sequence.
A step to the previous node in a sequence.
A step nowhere.
A step nowhere. I.e., the dependent attribute is evaluated at the current node.
Return the optional column number of a message.
Return the optional column number of a message.
Create and initialise the configuration for a particular run of the compiler.
Create and initialise the configuration for a particular run of the compiler.
Default: call createConfig
and then initialise the resulting configuration.
Support Kiama-specific profiling dimensions.
Support Kiama-specific profiling dimensions.
Driver for this compiler.
Driver for this compiler. First, use the argument list to create a configuration for this execution. Then, use the configuration to run the file processing in the appropriate way.
The character encoding of input files read by this compiler.
The character encoding of input files read by this compiler. Defaults to UTF-8.
Format the message for reporting as a line containing the position and label, the input text line and line(s) containing the context of the position.
Format the message for reporting as a line containing the position and label, the input text line and line(s) containing the context of the position. If no position is associated with this message just format as a line containing the label.
Return a string containing all the given messages sorted and formatted.
Return a string containing all the given messages sorted and formatted.
Return the optional line number of a message.
Return the optional line number of a message.
The entry point for this compiler.
An ordering on messages that prioritises line over column.
An ordering on messages that prioritises line over column.
A message's starting position as determined from the starting position of the message's value.
A message's starting position as determined from the starting position
of the message's value. Will be None
if the value has no position.
Print the dependency graph for the attribute evaluation represented
by record
.
Print the dependency graph for the attribute evaluation represented
by record
. The output is in dot form.
Process a file argument by using makeast
to turn their contents into
abstract syntax trees (ASTs) and then by process which conducts arbitrary
processing on the ASTs.
Process a file argument by using makeast
to turn their contents into
abstract syntax trees (ASTs) and then by process which conducts arbitrary
processing on the ASTs. The character encoding of the files is given by
the encoding
method.
Process the files one by one.
Output the messages in order of position using the given emitter, which defaults to terminal output.
Output the messages in order of position using the given emitter, which defaults to terminal output.
Take any actions that need to be done at the start of reporting.
Take any actions that need to be done at the start of reporting.
Trait to provide basic functionality for a compiler-like program constructed from phases, including profiling and timing support.
T
is the type of the syntax tree communicated from the parser to the main processing of the compiler.C
is the type of the configuration.