Commit Graph

9405 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
ca0f8eb315 Transition Libpythonlang to Lkt/lkm
Also stop building it in `manage.py`` (it is no longer needed for common
Langkit operations). Rename and repurpose `contrib/python_grammar` to
generate+build Libpythonlang, in an attempt to ensure it does not bit
rot.
dsl_unparse
2025-02-06 09:31:49 +00:00
Pierre-Marie de Rodat
863be42475 Self-host Lkt (i.e. transition Liblktlang to Lkt)
Add pre-generated sources for Liblktlang in `contrib/lkt/bootstrap` so
that it is possible to build one version of Liblktlang in order to
compile Liblktlang's Lkt sources.

Adjust `manage.py` to build that bootstrap version of Liblktlang
automatically, and add a `manage.py bootstrap` command to genererate
sources for the bootstrap Liblktlang.
2025-02-06 09:31:49 +00:00
Rémi Segard
1cec20eec6 Merge branch 'topic/java/add_visitor_with_default_behaviour' into 'master'
Add visitor with default behavior in Java bindings

Closes #891

See merge request eng/libadalang/langkit!1310
2025-01-31 15:54:41 +00:00
Remi Segard
c92a5d0027 Add visitor with default behavior in Java bindings 2025-01-31 14:35:27 +01:00
Pierre-Marie de Rodat
c96df668f2 Merge branch 'mr/pmderodat/lkt-preliminary' into 'master'
Preliminary Lkt/dsl_unparse adaptations to self-host Lkt

See merge request eng/libadalang/langkit!1301
2025-01-27 15:21:21 +00:00
Pierre-Marie de Rodat
152ae5c1fe lkt/language/parser.py: rename "enum" identifiers
"enum" is a Lkt keyword, so another identifier is needed to prepare the
transition to Lkt.
2025-01-27 15:20:56 +00:00
Pierre-Marie de Rodat
3f2e40ae2e lkt/language/parser.py: add missing call to Var() 2025-01-27 15:20:56 +00:00
Pierre-Marie de Rodat
3897983cce Lkt: rename GrammarDecl.lexer to referenced_lexer
`lexer` is a keyword in Lkt, so having a property called `lexer` in Lkt
is an obstacle from the self-hosting of Lkt itself. Rename that property
to avoid this issue.
2025-01-27 15:20:56 +00:00
Pierre-Marie de Rodat
ee702fcc37 Lkt: rename ValDecl.val to ValDecl.expr
`val` is a keyword in Lkt, so having a field called `val` in Lkt is an
obstacle from the self-hosting of Lkt itself. Rename that field to avoid
this issue.
2025-01-27 15:20:56 +00:00
Pierre-Marie de Rodat
29278577d1 Lkt: turn pattern names to lower case 2025-01-27 15:20:56 +00:00
Pierre-Marie de Rodat
fd1597bdd4 langkit.dsl_unparse: fix unparsing of dynamic EnvGet.lookup_kind 2025-01-27 15:20:56 +00:00
Pierre-Marie de Rodat
24d5f8e809 Merge branch 'mr/pmderodat/lkt-bootstrap' into 'master'
Ensure that "lkm build" and "lkm run" do not import liblktlang

See merge request eng/libadalang/langkit!1298
2025-01-27 15:20:49 +00:00
Pierre-Marie de Rodat
dfaad89720 Ensure that "lkm build" and "lkm run" do not import liblktlang 2025-01-27 15:20:43 +00:00
Pierre-Marie de Rodat
c4bb2acecd Merge branch 'mr/pmderodat/portable-projects' into 'master'
Rename --relative-project to --portable-project and remove absolute filenames from the generated code

See merge request eng/libadalang/langkit!1299
2025-01-27 15:20:33 +00:00
Pierre-Marie de Rodat
6af2fbe71c GDB helpers: include basenames only in directive comments
Absolute filenames are not useful in practice: there was no know homonym
Python files in known codebases implemented using the Python DSL, and
homonyms are very unlikely in Lkt codebases. Using basenames will remove
a big source of variation for code generation, which is particularly for
portable projects.
2025-01-27 15:19:37 +00:00
Pierre-Marie de Rodat
deb710cfca Add type hints for "gdb_*" code emission helpers 2025-01-27 15:19:37 +00:00
Pierre-Marie de Rodat
0657f7ac11 Do not emit langkit path/.debug_gdb_scripts for portable projects
Both necessarily contain absolute paths, so they are not appropriate for
--portable-project.
2025-01-27 15:19:37 +00:00
Pierre-Marie de Rodat
6f6610223d Rename --relative-project to --portable-project
The new name reflects more closely the goal: no source file should
contain absolute paths in the whole project so that the generated
sources are truly portable. This is not yet the case, upcoming work will
take care of remaining issues.
2025-01-27 15:19:37 +00:00
Pierre-Marie de Rodat
a326095a44 Merge branch 'mr/pmderodat/lkt-unparsing-lexer' into 'master'
Lkt unparsing: fix handing of token literals in GrammarRuleDecl

See merge request eng/libadalang/langkit!1302
2025-01-27 15:19:18 +00:00
Pierre-Marie de Rodat
ab30efda52 Lkt unparsing: fix handing of token literals in GrammarRuleDecl 2025-01-27 15:19:13 +00:00
Pierre-Marie de Rodat
8f81c63f65 Merge branch 'mr/pmderodat/lkt-run' into 'master'
lkm run: fix the handling of arbitrary subcommand arguments

See merge request eng/libadalang/langkit!1303
2025-01-27 15:18:59 +00:00
Pierre-Marie de Rodat
8d21266304 lkm run: fix the handling of arbitrary subcommand arguments 2025-01-27 15:15:15 +00:00
Pierre-Marie de Rodat
75ebae9a3d Merge branch 'mr/pmderodat/lkt-types' into 'master'
liblktlang-implementation-extensions.adb: fix memory leaks

See merge request eng/libadalang/langkit!1304
2025-01-27 15:02:32 +00:00
Pierre-Marie de Rodat
aa125c258e liblktlang-implementation-extensions.adb: fix memory leaks
After a function has unwrapped the `Text_Type` stored in a `String_Type`
value, it must release its ownership share for that `String_Type` value.
2025-01-27 15:02:25 +00:00
Pierre-Marie de Rodat
e3b87093f4 Merge branch 'mr/pmderodat/unused_docs' into 'master'
langkit.documentation: remove unused doc entries

Closes #888

See merge request eng/libadalang/langkit!1296
2025-01-27 15:02:20 +00:00