Course outline for ANTLR

TechnologyANTLRDuration * 2-3 days LevelPrerequisites listed

Pre-requisites

  • 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

How we train

Online training for ANTLR

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

All sessions are 100% hands-on. Labs and activities are derived from real-world work our engineers deliver.

Classroom training

Available for corporate teams in:

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

Note: Classroom training is for corporate clients only.

Self-paced hands-on sessions are delivered via VirtualCoach.

Detailed Course Outline

Hands-on

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