Skip to content

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees.

License

Notifications You must be signed in to change notification settings

isabelafaraujo/ANTLR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to ANTLR

General info

This repository is an introduction to the ANTLR, ANother Tool for Language Recognition. Initially some simple examples were made to get familiar with the Parser generator and with the progress some other examples will be updated, as well as new projects involving the language.

Technologies

Project is created with:

  • ANTLR version: 4

Setup

To run this project I used the IntelliJ IDE with the ANTLR plugin and suport. To generate a grammar using ANTLR it is important that the filename is the same as the name of the grammar and that the file is in the .g4 extension, for example:

grammar Hello;

r   : 'hello' ID;
ID  : [a-z]+ ;
WS  : [ \t\r\n]+ -> skip

And this file needs to be saved as Hello.g4

About

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published