Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.
/ antlr4-grammar Public archive

This project is currently not maintained.

License

Notifications You must be signed in to change notification settings

TypeFox/antlr4-grammar

Repository files navigation

antlr4-grammar

The goals are:

  • to have a Langium grammar for Antlr4
  • to convert existing Antlr4 grammars to Langium
  • to have a zoo of grammars 🐘 🐍 🐻

Current progress (including branches)

  • migrate lexer, including modes
  • migrate parser, including ambiguity resolution
  • implement scoping correctly, instead of hacking the document builder
  • scanning all pom.xml within the antlr4-grammars repo (246/~300)
  • covering 100% of all antlr4-grammars (215/246)... so that the Langium grammar for ANTLR4 accepts ANTLR4 inputs
  • transpile 100% of grammars to recognize all examples in each grammar's examples folder
  • add validators as needed

Getting started

This repository uses Git submodules. So do your git clone with the flag --recurse-submodules to checkout the dependencies as well.

git clone https://github.com/langium/antlr4-grammar --recurse-submodules

How to transpile ANTLR4 to Langium

During the migration of the ANTLR4 grammar for ANTLR4 itself, I will write down which steps were needed.

  • migrate each ANTLR4 lexer rule of the pattern Rule: 'constant'; by ...

TokenBuilder:

  • migrate each mode MMM by ...
  • migrate each pushMode(MMM) by ...
  • migrate each popMode() by ...

About

This project is currently not maintained.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published