Git Product home page Git Product logo

atlsharp's Introduction

#ATL#: an ATL parser for .NET ATL#, pronounced as “ATL Sharp”, is an ATL ([Atlas Transformation Language] 1) parser written in C# for the .NET platform. It is implemented as an assembly and thus can easily be incorporated into other projects (in any .NET language).

Description

The base parser was generated using the [Antlr] 2 parser generator. Antlr translates a so-called grammar into a parser/lexer. The grammar for the ATL language was created from its [BNF grammar] 3. However, some changes were made to this original BNF.

Firstly, the “module” rule was expanded. It is now referencing separate rules for the source model, target model and transformation mode (i.e. sourceModelPattern, targetModelPattern and transformationMode). There might be more of these changes possible in other parts of the grammar, depending on your particular use case.

Secondly, in some places “IDENTIFIER” has been changed to the choice of an identifier or a string as some of the example transformations used during the development of the parser allowed both. This is a bit different than the concept of Identifer in other languages such as Java, C#. It is still unclear whether this applies to every instance though. If so, the grammar should be modified accordingly.

A small wrapper class, the “ATLTransformationParser”, was written to facilitate the parsing of ATL transformations. The parser can take either a filename or a stream as input (i.e. via the Parse method). Alternatively, a string can also be given as input (i.e. via the ParseString method). In both cases, a parse tree (syntax tree) is returned which can be traversed either manually or via a dedicated visitor.

Version

1.0.0

Notes

  • Please note that the same grammar that was used here could also be used to generate a similar Java parser for ATL.

Version

3.0.2

License

Apache 2.0

atlsharp's People

Contributors

bpellens avatar

Watchers

James Cloos avatar Raymond Zhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.