Commit Graph

6667 Commits

Author SHA1 Message Date
Raphaël AMIARD
092a3af16c RA22-015: Fix enum class subclasses scoping 2020-03-19 10:33:51 +01:00
Raphaël AMIARD
3b0a7fe6f4 RA22-015: refactor static_match_params
* Make it actually contain results for non matched actuals/formals.

* Move it on CallExpr (because even though it is a static method, it is
not needed anywhere else than there for the moment).

* Make ``ParamMatch.formal`` a ``ComponentDecl`` rather than a
  ``BaseValDecl`, which is more precise and allows us to rely on the
  default value inside of ``static_param_match``, eg. not generate
  missing formal results for formals that have a default value.

This will allow us to use it to check for legality of calls, not only
resolve correct calls.
2020-03-19 10:33:51 +01:00
Raphaël AMIARD
124511a7c0 RA22-015: Resolve names of params in calls with named params 2020-03-19 10:33:51 +01:00
Raphaël AMIARD
0f08978f7b RA22-015: pretty error messages in lkt_resolve.py 2020-03-19 10:33:51 +01:00
Raphaël AMIARD
3450374bda RA22-015: add --check-only param to lkt_resolve.py 2020-03-19 10:33:51 +01:00
Raphaël AMIARD
7b26d39f63 RA22-015: Reorganise value declarations
The new scheme is cleaner, and will be useful in a later commit to be
able to use component declarations in ``static_match_param``.
2020-03-19 10:33:51 +01:00
Raphaël AMIARD
13e6398244 RA22-015: Use traits to share behavior in Array/ASTList 2020-03-19 10:33:51 +01:00
Raphaël AMIARD
910a912e0a RA22-015: Test traits 2020-03-19 10:33:51 +01:00
Raphaël AMIARD
ba6bed4225 RA22-015: Add traits 2020-03-19 10:33:51 +01:00
Pierre-Marie de Rodat
517c0fcca4 Update coverage buffers dumping code after recent GNATcoverage changes
TN: T110-022
2020-03-17 16:26:29 +01:00
Pierre-Marie de Rodat
17d3c0a031 contrib/lkt_import: spawn subprocesses
On Windows, modifications to `os.environ` in `test.py` do not reach
instances of Liblktlang in the same process, so move Lkt operations to a
subprocess.

TN: RA22-015
2020-03-17 16:26:29 +01:00
Pierre-Marie de Rodat
0d9ef993b8 Testsuite: define LKT_PATH in drivers rather than in testcases
Unlike what happens on Linux, it seems that on Windows, modifying
`os.environ` in the Python interpreter has no effect on the environment
variables seen in the same process by Ada code. As a consequence, in
order for Liblktlang to have access to the desired LKT_PATH environment
variable, define it in the test drivers so that test processes inherit
it and so that Liblktlang has always access to it.

TN: RA22-015
2020-03-16 19:12:16 +01:00
Pierre-Marie de Rodat
1455ee51fb Lkt: use the native OS path separator for LKT_PATH
Unconditionally using ":" does not work on Windows, as all absolute
directory names contain it (C:\foo\bar).

TN: RA22-015
2020-03-16 19:12:16 +01:00
Pierre-Marie de Rodat
c7db698884 GDB helpers: fix a pasto
TN: QB21-034
2020-03-16 19:12:16 +01:00
Pierre-Marie de Rodat
8bf47a779a Update and complete comments for the rerooting mechanism
TN: T226-048
2020-03-16 19:12:16 +01:00
Pierre-Marie de Rodat
ff6ad069a8 grammar/invalid_lkt: remove unused iteration index
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
3978fb62b6 grammar/invalid_lexers: extend testcase
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
dcffaba4a4 Add support for LKT lexers, transition tests
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
899c5791e4 Lkt: make StringLit.p_is_regexp_literal public
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
a6730e92f4 Lkt: document StringLit.p_denoted_value's edge case
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
253b4b6f86 Lkt: document the StringLit unique type design
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
f17112ac60 Lkt: add a TODO in StringLit.p_denoted_value's implementation
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
8f9232f99e Regenerate lexer_example.lkt
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
7f0417b37a dsl_unparse: fix token kind detection
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
3b51a0dc51 Lkt: distinguish @foo and @foo() in syntax trees
TN: RA22-015
2020-03-16 10:41:18 +01:00