Unless it is a hobby project, the vast majority of programmers should avoid writing their own compiler. You should write your own compiler or interpreter because you have a unique idea for a programming language that is not already available. Maybe you’ve come up with a new grammar or programming paradigm that you think would be more expressive.
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.
Why did I write this book?
It was on the wishlist that I will create our own compiler using C# but there were not many articles and books on this topic. Most of the articles or books were written in Java . This book is for C# developer you want to create their own DSL and compiler using ANTLR. This book has a lot of real-world examples like Parsing CSV, CSV to JSON, SQL Query to MongoDB convertor, and one final project JavaScript mini. All examples are ready to use and fully tested.
COMPILER AND ANTLR BASICS
- Compiler Basics
- Grammars: Describing Syntax and Semantics
- Syntax Analysis-Parser
- DSL (Domain-Specific Languages)
- Getting started with ANTLR
- Configure ANTLR On Windows
- Building and Testing Antlr4 Grammar
A- NTLR – Grammar Description - ANTLR Lexer SyntaxBasics-I
- ANTLR Lexer SyntaxBasics-II
- Semantic Predicate,Actions and Attributes
- Useful ANTLR Class And Method
- Handmade Lexer and Parser
- Abstract Syntax Tree
- Generate Code Using ANTLR
- Design Patterns
-ANTLR Listeners - ANTLR Visitors-Tree visitors
- ANTLR Modes-Island grammar
- Handling Errors in ANTLR4-Syntax Error
- Handing Errors In ANTLR-Semantic Errors
- CREATE YOUR OWN LANGUAGE AND IL GENERATION
- B Language
- CIL Basics
-Machine Code Generation (MSIL) - Machine Code Generation (MSIL) Continue
- ANTLR- REAL WORLD EXAMPLE
- Convert Csv To Json
- String To JSON
- Parse Http Url
- SQL TO MongoDB Converter
- Generate Assembly Code From Source Code
- ANTLR-Tips & Tricks