Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4552806
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:51:04+00:00 2026-05-21T16:51:04+00:00

I am a beginner at ANTLR, I have the 2 books by it’s creator

  • 0

I am a beginner at ANTLR, I have the 2 books by it’s creator and I am reading a lot of blogs/forums posts but it seems that I just don’t get it right now.

All I can find is grammar code for this, and tree grammar code for this, but I just can’t understand how exactly a control flow is made out of this.

Because I suppose that I can’t put my question clear enough for you, let me put it that way:

Can you please show me all necessary code that upon passing to the parser

for (i=0; i!=3; i=i+1) {
   if (i==2) print i;
   else print "not 2";
}

Will output:

not 2  
not 2  
2

Preferably in Java.

Edit: I found a small project hosted at code.google.com that uses ANTLR, and based on it I understood how silly is my question ! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:51:04+00:00Added an answer on May 21, 2026 at 4:51 pm

    As a scanner/parser, Antlr only implements what we call the front end of a compiler. Antlr’s task is to take free-form text and turn it into a data structure that’s easy for programs – particularly compiler back ends – to work with.

    Writing that compiler back end (or interpreter, or whatever) is still your job, I’m afraid!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A beginner question I am sure, but I have just started working with a
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
Beginner programmer here....hope it makes sense :) I have created a console app that
Total beginner with PHP: I have an form based on table data that the
I'm a beginner using ANTLR. I'm just doing the following for test purposes and
Beginner. I have a tab control that has content loaded dynamically via links. These
Python beginner, I have become familiar with reading through a file and doing basic
Beginner rails/javascript question: Let's say that I have a simple Circle model in a
beginner to python here. I have 2 nested lists that I want to merge:
Beginner iOS dev here. I have a problem in my array. Im making an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.