I have i doubt in a problem,trying to calculate FOLLOW(S) which needs FOLLOW(A) in it,but as A production is after S production,we have not calculated FOLLOW(A) yet.So,should we add FOLLOW(A) too inf FOLLOW(S)???
Related Questions in PARSING
- TypeScript: Type checking while parsing an arbitrary JSON that is typed/
- How to have fixed options using Option.Applicative in haskell?
- How to convert mathematical expression to lambda function in C++?
- JsonObject throws an exception: JSONObject["employer_website"] is not a string (class org.json.JSONObject$Null : null)
- Trying to fix my c++ code for it to read the right amount of nodes from a file
- Selenium get page after "loading" page
- Parse tag in html via Google Sheets (importxml)
- FluentD / Fluent-Bit: Concatenate multiple lines of log files and generate one JSON record for all key-value from each line
- Editing non-String values in JComboBox
- Handling multiple errors in Bison parser
- Which is the most idiomatic way to parse an i32 from ascii in Rust
- I got this error from a JSON Validator - what does this mean?
- Conflict between lexer rules in ANTLR4 for Fortran grammar
- mqtt message parsing problem in a node.js
- How to print error code from URL response in swift
Related Questions in COMPILER-CONSTRUCTION
- Reference: Crafting Interpreters. Print statement is not able to evaluate expression. Help me fix this (details below)
- Load function written in amd64 assembly into memory and call it
- I have implemented till Statements and State in Tree Walk Interpreter. I am pissed with an error
- Resolve shift/reduction conflict in grammar for expressions in PLY for calls to embedded functions
- Grammar for access to properties and calls to embedded functions
- LLVM code generation causes problems with pointer arithmetic
- what does react compiler mean actually?
- Errors on Recursive Descent Parsing Java
- Java CUP produces Shift-Reduce conflict when parsing a grammar for a C++ type language
- Three-Address-Code (TAC) and Conjunction/Disjunction
- How do I write an implicit cast for my strongly typed interpreter? (C++)
- Yacc parser not reducing specific production rules as intended
- Why is the function version tag consistently "Base" in HDF5 library?
- Sly parser, how are recursively defined types implemented?
- Does a non terminal token need an explicit definition?
Related Questions in GRAMMAR
- Need clarification on pumping lemma for context free languages
- Grammar for combinations of Numpy arrays
- What is exactly Ruby's `not` keyword?
- VSCode Extension - Grammar Injection Into Multiple Languages
- Integrating Grammar/Spellcheck Tool in ASP.NET Application for Textarea
- Is the alternative operator in ABNF match first or longest?
- ANTLR4 matches to lexer rule instead of parser rule
- Distinguishing integer and decimal arithmetic with ohm.js
- Trouble with Island Grammar parsing unordered network configuration using Python textx
- ANTLR4 for Function Pointers in C
- Constructing grammar based on given rules
- Is this grammar LR(0) or SLR(1)
- ANTLR4 explain variable declaration error
- Bison ID reduction conflict
- SGF Grammar Parser with Peggy
Related Questions in BOTTOM-UP
- Eliminating Recursion stack space
- bottom up register allocation, reserving register for loads/stores
- Cant initialize a 2d array/matrix to 0
- Recursive query sum leaf values and pass sum to parents. Values stored in another table
- How do you implement the bottom-up and top-down approach in this problem?
- How can I add limited coins to the coin change problem? (Bottom-up - Dynamic programming)
- Count the sum of subsets of size k when the sum is (Greater than or equal to R) or (Lesser than or equal to L)
- Runtime Error when Trying Bottom Up Approach to Implement Fibonacci function in Swift?
- when adding new text it appears on bottom and rest of text goes up
- How to convert the recursive solution to "Moons and Umbrellas" to DP?
- LR-Parsing-Table: What determines next state in reduce-actions?
- Output produced for the given input using the bottom up parsing
- L-attributed grammar and bottom-up parsing
- Parsing table size (bottom-up)
- Find k out of n subset with maximal area
Related Questions in TOP-DOWN
- IsTouching and OverlapCollider contradicting each other?
- Unity - Make player point toward mouse
- c++ player-wall collision with SFML
- 2D Depth System Method XNA C#
- Dynamic programming Topdown approach - minimum cost in a matrix (in python)
- Smallest n-bit integer c that has k 1-bits and is the sum of two n-bit integers that have g, h bits set to 1(dynamic programming)
- AntlrGrammar.g4::: The following sets of rules are mutually left-recursive [subquery]
- How to extend the background in LibGdx for top down game?
- Approach handling data that are introduced “Bottom-up” and refined “Top-down”
- Top-down tree search & replace
- ACODE - spoj: Suggest what might be wrong with my approach
- How to implement an algorithm to merge two heaps with n=2^k number of elements in O (k) time?
- Java: Iteration to find a coordinate point that hasn't been used?
- Identify data warehouse design methodologies in the following diagram
- With only rudimentary prior programming experience, exactly how would I begin creating a 3d top-down game using unity3D?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)

To compute FOLLOW(S) for any non-terminal S, apply the followwing rules until nothing can be added to any FOLLOW set.
Place $ in FOLLOW(S), where S is the start symbol.
If there is a production S -> CBD, then everything in FIRST(D) except epsilon is in FOLLOW(B).
If there is a proudction S -> CB, or a production S -> CBD, where FIRST(D) contains epsilon, then everything in FOLLOW(S) is in FOLLOW(B).
SO, as you can see from the given grammar,
as per rule 1, the follow(S) will contains $.
Also, as per rule 2, S appears in bodies only followed by D(non-terminal), thus, everything except epsilon that is in FIRST(D) must be in FOLLOW(S). So, FOLLOW(S) must contain a.
Also,as per rule 3, considering the production A->ASD |epsilon and FIRST(D) contains epsilon, we should get FOLLOW(S) = FOLLOW(A).
So, yes you need to calculate FOLLOW(A) before FOLLOW(S).
And, FOLLOW(A) = everything in FIRST(S) except epsilon + b = {a,b}.
Hence, FOLLOW(S) = {a,b,f,$}.
I don't know how you come to calculate that FOLLOW(A) is required for calculating FOLLOW(S). It is not the case. Please again go through the rules 1 to 3 mentioned in the starting of this answer.