Class
ATLParser
Parser for ATL (Atlas Transformation Language) files
actor ATLParser
Overview
The ATL parser converts ATL source files into structured ATL modules that can be executed by the ATL virtual machine. It supports:
-
Module declarations with source/target metamodels
-
Helper function definitions (context and context-free)
-
Matched transformation rules
-
Called transformation rules
-
Query expressions
-
Basic ATL expression syntax
Supported ATL Constructs
-
Modules:
module ModuleName; -
Create statements:
create OUT : Target from IN : Source; -
Helpers:
helper def : helperName() : Type = expression; -
Context helpers:
helper context Type def : helperName() : Type = expression; -
Matched rules:
rule RuleName { from ... to ... } -
Called rules:
rule RuleName(params) { to ... } -
Queries:
query QueryName = expression; -
Expressions: literals, variables, operations, navigation
Example Usage
let parser = ATLParser()
let module = try await parser.parse(atlFileURL)
Topics
Initializers
Public initializer for ATLParser
Instance Methods
Parse an ATL file and return an ATL module
Parse ATL content from a string.