Skip to content

Android IDL support (updated older implementation, now published)#159

Merged
gunnar-mb merged 2 commits intoCOVESA:masterfrom
gunnar-mb:AIDL
Feb 24, 2026
Merged

Android IDL support (updated older implementation, now published)#159
gunnar-mb merged 2 commits intoCOVESA:masterfrom
gunnar-mb:AIDL

Conversation

@gunnar-mb
Copy link
Collaborator

Author: Gunnar Andersson <gunnar.andersson@mercedes-benz.com>, MBition GmbH.

Android IDL support

The Android IDL support (.aidl) was first developed last year but not fully published.
It has been updated and completed to a much higher level now, cleaned up and documented (with comments)
and it is time to put it into the project.

Good sized test suite is also included now (done with AI-generation support)

The converter uses the imperative approach instead of the declarative/table. While not as elegant, it is relatively easy to maintainer. As always, this could evolve later.


The submission is provided under the main project license (LICENSE file in root of project).

The program was tested solely for our own use cases, which might differ from yours.

Provider Information

Implements a new Android IDL (AIDL) parser (still Lark-based and based
on old work but now much more complete).  After Lark parser, the token
tree is walked to build up an AST as usual (similar design as
protobuf/grpc, etc). Finally, an AIDL->IFEX model/model translation is
implemented.

aidl.grammar: Lark LALR grammar for AIDL syntax
aidl_lark.py: Lark tree walker → AIDLFile AST
aidl_to_ifex.py: AIDLFile AST → IFEX AST
entrypoints/aidl_to_ifex.py: CLI entrypoint

EDIT: AIDL tests were added later (mostly AI generated)

Signed-off-by: Gunnar Andersson <gunnar.andersson@mercedes-benz.com>
ifex_to_aidl.py model-2-model convert ifex to aidl model
aidl_generator.py: Jinja2-based generator with templates

+ tests and entrypoints

Signed-off-by: Gunnar Andersson <gunnar.andersson@mercedes-benz.com>
@gunnar-mb gunnar-mb changed the title Android IDL support (updated older implementation) Android IDL support (updated older implementation, now published) Feb 24, 2026
@gunnar-mb gunnar-mb merged commit a114310 into COVESA:master Feb 24, 2026
7 checks passed
@gunnar-mb
Copy link
Collaborator Author

@mbenelli Can you (retroactively) please take a look at this one also?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant