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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:16:41+00:00 2026-05-15T15:16:41+00:00

I am taking a principals of programming class right now. We are learning about

  • 0

I am taking a principals of programming class right now.

We are learning about LL(1) grammars.

I found the book and lectures to be somewhat unclear and was hoping that someone could refer me to a good resource.

I found some good youtube tutorials for finate state automatons and determinate state automatons, but I cannot find anything similar for LL(1) grammars. It appears that there is a fair bit of info, it is just confusing. Looking for an “easy steps” approach.

Have a good weekend! Happy 4th of July to all you Americans!


Edit: I understand how the First works but I am not clear on the follow.

  • 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-15T15:16:42+00:00Added an answer on May 15, 2026 at 3:16 pm

    LL basically means “top down”.

    A top down parser is something that starts with the proposition of wanting to parse the top level element in a grammar first, consumes the tokens necessary to start that element, and then proceeds to recurse “downwards” toward more detailed elements in the grammar.

    The easiest way to understand top-down parsing is to implement a parser. A hypothetical example may look like:

    void parseFile()
    {
        while(classesContinue())
        {
            parseClass();
        }
    }
    
    void parseClass()
    {
        consume(Tokens.Class);
        consume(Tokens.ID);
        consume(Tokens.LCurly);
        while(membersContinue())
        {
            parseMember();
        }
        consume(Tokens.RCurly);
    }
    

    The number in paranthesis next to LL (as in LL(1)), is the maximum number of look ahead necessary to implement any “choices” that have to be made by the parser. For example, “parseMember” may look like:

    void parseMember()
    {
        parseTypeName();
        parseID();
        switch (lookAhead())
        {
            case Tokens.Semi:
            case Token.Equals:
                parseVariableDecl();
                break;
            default:
                parseMethod();
                break;
        }
    }
    

    In which case the parser would be LL(1), because it requires one token of lookahead.

    In any case, an LL (1) grammar is just a specification of an LL(1) parser in a formal notation, usually some variant of EBNF.

    Does that help?

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

Sidebar

Related Questions

I am taking a principles of programming languages course right now but I cannot
In my principles of programming class we are talking about different calling methods. Some
Taking over some code from my predecessor and I found a query that uses
Taking advice from this post , I purchased a copy of 'The C Programming
Hey. I'm taking a course titled Principles of Programming Languages, and I need to
OOP is about programming with interface, not the implementation. Objects are talking to each
Taking Fabien Potencier's example : class User { function __construct($storage) { $this->storage = $storage;
Taking shs's question a step further... Why isn't all government sponsored software open source?
Taking CPU affinity into account, will such an environment be useful with threading? Or
Taking this article on classes and structs as an example: http://msdn.microsoft.com/en-us/library/ms173109.aspx namespace ProgrammingGuide {

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.