Course outline for ANTLR

Pre-requisites for learning ANTLR

  • Participants must have a good knowledge of Java
  • Good to know Finite Automata.

Lab Setup

  • A minimum of 20GB of disk space and atleast 4GB of RAM
  • Ensure that all participants have a properly functioning Internet connection

Duration

  • 2-3 days

Training Mode

Online training for ANTLR

We provide:

  • Instructor led live training
  • Self-paced learning with access to expert coaches
  • 24x7 access to cloud labs with end to end working examples

All jnaapti sessions are 100% hands-on. All our instructors are engineers by heart. Activities are derived from real-life problems faced by our expert faculty. Self-paced hands-on sessions are delivered via Virtual Coach.

Classroom training for ANTLR

Classroom sessions are conducted in client locations in:

  • Bengaluru
  • Chennai
  • Hyderabad
  • Mumbai
  • Delhi/Gurgaon/NCR

Note: Classroom training is for corporate clients only

Detailed Course Outline for ANTLR

High Level Overview

  • Installation
  • Grammar Lexicon
  • Grammar Structure
  • Parser Rules
  • Actions and Attributes
  • Lexer Rules
  • Wildcard Operator and Nongreedy Subrules
  • Parse Tree
  • Semantic Predicates
  • Options
  • Parsing binary streams

Grammar Lexicon

  • Identifiers
  • Literals
  • Actions
  • Keywords

Grammar Structure

  • Grammar Imports
  • Tokens Section

Parser Rules

  • Alternative Labels
  • Rule Context Objects
  • Rule Element Labels
  • Rule Elements
  • Subrules
  • Catching Exceptions
  • Rule Attribute Definitions
  • Start Rules and EOF
  • Left-recursive rules

Actions and Attributes

  • Token Attributes
  • Parser Rule Attributes
  • Dynamically-Scoped Attributes

Lexer Rules

  • Lexical Modes
  • Lexer Rule Elements
  • Recursive Lexer Rules
  • Redundant String Literals
  • Lexer Rule Actions
  • Different Lexer Commands

Wildcard Operator and Nongreedy Subrules

  • Nongreedy Lexer Subrules
  • Nongreedy Parser Subrules

Parse Tree

  • Parse Tree Listeners
  • Parse tree patterns
  • Pattern labels
  • Creating parse trees with the pattern matcher
  • Using XPath to identify parse tree node sets
  • Combining XPath and tree pattern matching

Semantic Predicates

  • Making Predicated Parsing Decisions
  • Finding Visible Predicates
  • Using Context-Dependent Predicates
  • Predicates in Lexer Rules

Using Options

  • Grammar Options
  • Rule Options
  • Rule Element Options
  • ANTLR Tool Command Line Options

Parsing Binary Files

  • Binary streams
  • Custom stream
  • Error handling in binary files