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 6892303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:31:06+00:00 2026-05-27T06:31:06+00:00

FIRST(A) = { b, epsilon } FIRST(S) = { b, epsilon } FOLLOW(S) =

  • 0
FIRST(A)  = { b, epsilon  }
FIRST(S) = { b, epsilon  }

FOLLOW(S)  = { a, $ }
FOLLOW(A) = { a, b, $ }

What is the Arithmetic Expressions for this First & Follow set?

  • 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-27T06:31:07+00:00Added an answer on May 27, 2026 at 6:31 am

    FIRST(X) = the terminals which can appear first when trying parse the non-terminal X. If it can match an empty string, epsilon is also included.

    FOLLOW(X) = the terminals which can appear immediately after the non-terminal X. This is a union of the FIRST-sets of all symbols appearing after X in any parsing rule.

    Read more: LL parser

    The clues given are:

    1. FIRST(A), FIRST(S) ⇒ All of the derivations of A and S respectively, must either begin with the terminal b, or be zero-length.

      S → b … | ε
      A → b … | ε

    2. FOLLOW(S) ⇒ There must be some construction where S is followed by the terminal a, or a non-terminal which can begin with a. (Neither A nor S qualify).

      S → b S a | ε
      A → b … | ε

    3. FOLLOW(A) ⇒ There must be some construction where A is followed by each of the terminals a and b, or some non-terminal which can begin with those.

      S → b S a | ε
      A → b A b | b A a | ε

    4. FOLLOW(A) ⇒ Assuming S is the start-symbol, A must appear at the end of some branch of S, possibly followed by other nullable non-terminals.

      S → b S a | A | ε
      A → b A b | b A a | ε

      (NB. Adding A to S did not break the constraint on FIRST(S))

    We can make the grammar a little smaller:

    S → b S a | A | ε
    A → b A b | ε

    We can no longer generate strings like “bbbabb“, but it does not violate the constraints.

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

Sidebar

Related Questions

First off, there's a bit of background to this issue available on my blog:
First let me say that I really feel directionless on this question. I am
I'm not sure if when they write 1 if this is the first or
First of all, I am sorry if this question doesn't belong to SO since
First let me apologize a bit for the length of this post, it's mostly
First let me preface this question by saying that I'm fairly new to Javascript.
First of all this is tough thing to solve, so far I didn't come
First off, I know how to and has Integrated Windows Authentication in IIS7. This
First post, but I've been lurking around this site for a long while now,
First of all, my table structure is something similar like this: CREATE TABLE Testing(

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.