An array type with the given size and element type.
Marker trait for all built-in entities.
A built-in procedure with its parameter information.
A built-in type with an implicit definition that the compiler must have special knowledge about.
A user-defined constant entity represented by a constant declaration.
A record field.
A built-in value of some type that is represented by a particular integer value.
A user-defined module represented by a module declaration.
Information about a particular parameter.
A parameter is a variable augmented with a passing mode.
A procedure entity represented by a procedure declaration.
A record with the given fields.
An entity representing by a user-provided type declaration.
A user-defined type.
A variable entity including a reference to its types' definition.
A ScalaTest tag that enables us to focus attention on particular tests rather than running all of them each time.
The name of this artefact.
Assert that a received message at the given zero-based index conforms
to an expected one in that it reports the same message label at the same
position.
Assert that a received message at the given zero-based index conforms
to an expected one in that it reports the same message label at the same
position.
Assert that the received list of messsages has recorded the expected
messages in the same order.
Assert that the received list of messsages has recorded the expected
messages in the same order.
Analogous to ScalaTest's assertResult but it uses optsame to compare
the two values instead of equality.
Analogous to ScalaTest's assertResult but it uses optsame to compare
the two values instead of equality.
Analogous to ScalaTest's assertResult but it uses same to compare
the two values instead of equality.
Analogous to ScalaTest's assertResult but it uses same to compare
the two values instead of equality.
Analogous to ScalaTest's assertResult but it uses optsame to compare
the two values instead of equality.
Analogous to ScalaTest's assertResult but it uses optsame to compare
the two values instead of equality.
Analogous to ScalaTest's assertResult but it uses same to compare
the two values instead of equality.
Analogous to ScalaTest's assertResult but it uses same to compare
the two values instead of equality.
The actual type of an expression following type aliases.
The actual type of an expression following type aliases.
Pretty-print a block, omitting the BEGIN if there are no statements.
Pretty-print a block, omitting the BEGIN if there are no statements. Add the possibility of declarations to the previous level.
Built-in Boolean type.
Built-in Boolean type.
Return an IF cascade equivaleant to the given cases and optional else block.
Return an IF cascade equivaleant to the given cases and optional else block. The variable ce holds the selection value. Specifically, these cases on ce CASE e1 : s1 CASE e2 .. e3 : s2 ELSE s3 are transformed into IF ce = e1 THEN s1 ELSEIF (ce >= e2) & (ce <= e3) THEN s2 ELSE 32 END If a case has more than one condition then they are combined with Or operators.
Check for non-local variable and procedure accesses.
Check for non-local variable and procedure accesses. In the L3 language non-local variable accesses are disallowed, unless they are to a variable at the top level. Non-local procedure accesses are just disallowed.
Consume the AST by translating it to C.
Consume the AST by translating it to C.
In the test configuration we pretty print the source and C ASTs by default.
In the test configuration we pretty print the source and C ASTs by default.
The built-in type associated with a type declaration.
The built-in type associated with a type declaration.
The default environment.
The default environment.
The default environment with pre-defined procedures added.
The default environment with pre-defined procedures added.
The type given by a type definition.
The type given by a type definition.
Desugar CASE statements into equivalent blocks containing cascading IF statements.
Desugar CASE statements into equivalent blocks containing cascading IF statements. A new variable called "casevar" is introduced in the block to hold the selection value so that it does not need to be re-evaluated. Specifically, CASE e OF cases END is transformed into VAR caseval : INTEGER; BEGIN caseval := e; IF caseval ... THEN ... END END
Desugar FOR statements into equivalent blocks containing a WHILE loop.
Desugar FOR statements into equivalent blocks containing a WHILE loop. A new variable called "limit" is introduced in the block to hold the upper limit of the FOR to protect against changes in the body. Specifically, FOR id := e1 TO e2 BY e3 DO body END is transformed into VAR limit : INTEGER; BEGIN id := e1; limit := e2; WHILE (id op limit) DO body id := id + e3 END END If e3 is negative, op is <=, otherwise it is >=.
Flag to decide whether to sanitise the output before comparison
of test results with expected results (see sanitise method).
Flag to decide whether to sanitise the output before comparison
of test results with expected results (see sanitise method).
Default is true; override with false if you want actual results
compared.
The program entity referred to by an identifier definition or use.
The program entity referred to by an identifier definition or use. In the case of a definition it's the thing being defined, so define it to be a reference to the declaration. If it's already defined, return a entity that indicates a multiple definition. In the case of a use, it's the thing defined elsewhere that is being referred to here, so look it up in the environment.
The entity for an identifier definition as given by its declaration context.
The entity for an identifier definition as given by its declaration context.
The environment containing bindings for all identifiers visible at the given node.
The environment containing bindings for all identifiers visible at the given node. It starts at the module declaration with the default environment. At blocks we enter a nested scope which is removed on exit from the block. At constant and type declarations the left-hand side binding is not in scope on the right-hand side. Each identifier definition just adds its binding to the chain. The envout cases for assignment and expression mean that we don't need to traverse into those constructs, since declarations can't occur there.
Blocks that are immediately inside procedure decls do not introduce new scopes since the procedure itself does.
Blocks that are immediately inside procedure decls do not introduce new scopes since the procedure itself does. This computation overrides the one earlier that pushes a scope for all blocks. Don't include the procedure name in the scope of its own body.
Similarly for envin we don't need to leave a scope for a procedure block, since we didn't enter one.
Similarly for envin we don't need to leave a scope for a procedure block, since we didn't enter one. The IdnDef that is for a ProcDecl needs to be in the outer scope, but not in the scope of its own body. All arguments and local declarations go in the nested scope.
The semantic errors for a tree.
The semantic errors for a tree.
The error checking for this level.
The error checking for this level.
Is an expression expected to be constant or not? Either the expression is the root of an expected constant expression or its parent expression is expected to be constant.
Is an expression expected to be constant or not? Either the expression is the root of an expected constant expression or its parent expression is expected to be constant.
The type expected of an expression as defined by its context.
The type expected of an expression as defined by its context.
Use of arrays and records is dealt with separately, not via the expected type.
Use of arrays and records is dealt with separately, not via the expected type.
Fail a test with a message about finding something and expecting something else.
Fail a test with a message about finding something and expecting something else.
Built-in false constant.
Built-in false constant.
Make tests that process the files in path.
Make tests that process the files in path. name is an identifying
name for this set of tests. All files whose names end in srcext are
processed. Processing is done by the function compile which must
return either Some (s) where s is the output or None if processing
failed. If srcext is .x and resext is .y, then the expected result
for foo.x is found in file foo.y. If optinext is Some (z), then
foo.z is used for standard input, if it exists, otherwise the string
indefault is used. A test fails if either the processing fails or
it succeeds with the wrong result. argslist is used to specify the
sets of command-line arguments that you want to use. Each test is
run with each set of arguments. The default is an empty argument list.
Is a given type a record type containing a field called f?
Is a given type a record type containing a field called f?
The type of the entity denoted by an identifier use.
The type of the entity denoted by an identifier use.
The type of a parameter is the type of its underlying variable.
The type of a parameter is the type of its underlying variable.
Perform initialisation of semantic analysis that is necessary before processing an AST.
Perform initialisation of semantic analysis that is necessary before processing an AST.
Built-in integer type.
Built-in integer type.
Return true if the entity is erroneous or is an array.
Return true if the entity is erroneous or is an array.
Return true if the given type is Boolean or an unknown type.
Return true if the given type is Boolean or an unknown type.
Array and record types are only compatible if they have the same name.
Array and record types are only compatible if they have the same name.
Return true if the entity is erroneous or is a constant.
Return true if the entity is erroneous or is a constant.
Return true if the entity is an error, false otherwise.
Return true if the entity is an error, false otherwise.
Return true if the given type is integer or an unknown type.
Return true if the given type is integer or an unknown type.
Return true if the expression can legally appear on the left-hand side of an assignment statement.
Return true if the expression can legally appear on the left-hand side of an assignment statement. At this level only allow identifiers of variables or things we don't know anything about. The true default is used so that this computation can be used in redefinitions.
Return true if the entity is erroneous or is a module.
Return true if the entity is erroneous or is a module.
Return true if the entity is erroneous or is not an array.
Return true if the entity is erroneous or is not an array.
Return true if the entity is erroneous or is not a record.
Return true if the entity is erroneous or is not a record.
Return true if the entity is erroneous or is a record.
Return true if the entity is erroneous or is a record.
Return true if the identifier is an r-value and hence its value can be used (ie.
Return true if the identifier is an r-value and hence its value can be used (ie. it's erroneous or is a constant, value or variable).
Return true if the entity is erroneous or is a type.
Return true if the entity is erroneous or is a type.
Parameters are variables too.
Parameters are variables too.
Is an expression constant or not? Unknown entities are constant.
Is an expression constant or not? Unknown entities are constant. Strictly speaking we only need to support integer expressions here, but we treat Boolean ones as constant in the same way so that we avoid spurious errors. Type analysis will reject Boolean constant expressions anyway.
Level of a node considering the module level to be zero and incrementing each time we enter a nested procedure declaration.
Level of a node considering the module level to be zero and incrementing each time we enter a nested procedure declaration.
Mangle an Oberon name so it is safe to be used at the C level.
Mangle an Oberon name so it is safe to be used at the C level. We assume that there are no C names with "ob_" prefix.
The maximum language level we support.
The maximum language level we support.
Make the tests for a given language subset.
Make the tests for a given language subset. proglang denotes the language subset whose tests are used.
Calculate the number of parameters to a procedure.
Calculate the number of parameters to a procedure. Return None if the identifier use does not denote a procedure.
Calculate the parameter information list for a procedure.
Calculate the parameter information list for a procedure. If it's a built-in we have the information already, otherwise we need to work it out from the declaration. Returns None if the entity is not a procedure.
Return the ith parameter mode of the procedure denoted by u (counting from one).
Return the ith parameter mode of the procedure denoted by u (counting from one). If u is not a procedure or has less than i parameters, return a value mode, since that mode places no constraints on its actual parameter.
Return the ith parameter type of the procedure denoted by u (counting from one).
Return the ith parameter type of the procedure denoted by u (counting from one). If u is not a procedure or has less than i parameters, return an unknown type.
Process the given abstract syntax tree.
Process the given abstract syntax tree. Send output to emitter, marking sections so that we can split things later.
Process the AST by transforming it.
Process the AST by transforming it. Then apply higher-level transformations.
Custom driver for section tagging and challenge mode for errors.
Custom driver for section tagging and challenge mode for errors. If a parse error occurs: in challenge mode, just send "parse failed" to standard output, otherwise send the message to the errors file.
The built-in Read procedure.
The built-in Read procedure.
(Changed in version 2.9.0) The p0 call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
Is this expression the root of what is expected to be a constant expression? At this level only expressions on the RHS of a constant declaration have this property.
Is this expression the root of what is expected to be a constant expression? At this level only expressions on the RHS of a constant declaration have this property.
Sanitise the output from a test.
Sanitise the output from a test. Remove any output that doesn't make sense to this program. I.e., if we are running a program that performs tasks 1-m, then any lines marked with [p], where p > m should be removed before comparison. Also, there can be three numbers, a'la [p,q,r] where p is as before and q (r) are lower (upper) inclusive bounds on the language level to which this output should apply. If p is omitted, the output applies to all task levels. If p is given, but q and r are omitted, the output also applies to all language levels.
Output a section heading so that the output can be split later.
Output a section heading so that the output can be split later.
Pretty-print a nested list of nodes separated by sep (default: semi colon) and line breaks.
Pretty-print a nested list of nodes separated by sep (default: semi colon) and line breaks.
ScalaTest by default only shows the unqualified class name when it displays the name of the suite.
ScalaTest by default only shows the unqualified class name when it displays the name of the suite. If a suite class name is used in more than one package we can't tell them apart. Here we override the name that is printed so that we get a project relative source file name as well.
This definition assumes that the test suite resides in the library project, that the name of the suite class is the same as the basename of the file and that the file is located in the folder given by the package name.
Run the compiler in test mode using the given configuration.
Run the compiler in test mode using the given configuration.
The type of an expression.
The type of an expression.
CNegExp (CNegExp) special case is to avoid output of --e which is interpreted as a pre-decrement operator.
CNegExp (CNegExp) special case is to avoid output of --e which is interpreted as a pre-decrement operator.
Desugar FOR and CASE statements into simpler constructs.
Desugar FOR and CASE statements into simpler constructs. Then call the next level of transformation.
Uses of array parameter names don't need to be dereferenced.
Uses of array parameter names don't need to be dereferenced.
Add translation for array and record types.
Add translation for array and record types.
Add translation of call statements.
Add translation of call statements.
Add translation of procedure declarations.
Add translation of procedure declarations.
Add STDIO header since output is now possible.
Add STDIO header since output is now possible.
Translation of expression, block pairs from an IF statement into cascading C IFs.
Translation of expression, block pairs from an IF statement into cascading C IFs.
Array parameters get passed by reference, so we don't need to insert addressing operations for VAR.
Array parameters get passed by reference, so we don't need to insert addressing operations for VAR.
Translate the actual parameters of a procedure call.
Translate the actual parameters of a procedure call. Assumes that the right number of parameters are present.
Array formal parameters are not made into address types.
Array formal parameters are not made into address types.
Translate the formal parameters of a particular defined procedure.
Translate the formal parameters of a particular defined procedure.
Built-in true constant.
Built-in true constant.
The actual type that a user type denotes.
The actual type that a user type denotes.
Rename user-defined names to avoid clashes with outer declarations of the same name.
Rename user-defined names to avoid clashes with outer declarations of the same name. This transformation is not idempotent.
A type that is unknown, eg because the typed thing is erroneously defined.
A type that is unknown, eg because the typed thing is erroneously defined.
What is the value of an integer expression? Only needs to be valid if the expression is an integer constant (see isconst above) and is defined (eg, no divide by zero.
What is the value of an integer expression? Only needs to be valid if the expression is an integer constant (see isconst above) and is defined (eg, no divide by zero.) Returns zero in all other cases. FIXME: Ignores issues of overflow.
The built-in Write procedure.
The built-in Write procedure.
The built-in WriteLn procedure.
The built-in WriteLn procedure.
Please use the afterAll(ConfigMap) method of trait BeforeAndAfterAllConfigMap instead.
This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
Please use the beforeAll(ConfigMap) method of trait BeforeAndAfterAllConfigMap instead.
This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.
This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.
This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.
This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
(Since version 1.2.1) Use PrettyPrinter.any instead.