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

  • Home
  • SEARCH
  • 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 6593195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:39:05+00:00 2026-05-25T17:39:05+00:00

I need to convert the following grammar to EBNF: <assign> -> <id> = <expr>

  • 0

I need to convert the following grammar to EBNF:

<assign> -> <id> = <expr>
<id> -> A|B|C
<expr> -> <expr> + <expr>
    |<expr> * <expr>
    |<expr> * <expr>
    |( <expr> )
    |<id>

The progress I’ve currently made is below:

<assign> -> <id> = <expr>
<id> = (A | B | C)
<expr> -> <id> {(+ | * ) <expr>} | ‘(‘ <expr> ‘)’

Is it best to eliminate all recursion if using EBNF? Is there even a way to accomplish it using only <id> in <expr>?

  • 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-25T17:39:06+00:00Added an answer on May 25, 2026 at 5:39 pm

    How about this:

    <assign> -> <id> = <expr>
    <expr>   -> <mul>  {+ <mul>}
    <mul>    -> <term> {* <term>}
    <term>   -> ( <expr> ) | <id>
    <id>     -> A | B | C
    

    No left recursion, and * takes precedence over +, but not over ( ... ).

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

Sidebar

Related Questions

I need to convert all of the following forms into .NET Uri object: hello.world
I need to convert the following java method to scala and am having difficulty
I have the following int 7122960 I need to convert it to 71229.60 Any
I have the following FORTRAN code which I need to convert to C or
I need to convert the following xml with xslt <item>0</item> <item>1</item> <item>2</item> <item>3</item> <item>0</item>
I need to convert the following stored procedure of SQL Server to MySQL. I
I need to convert the following perl function to php: pack(SSA12AC4L, $id, $loc, $name,
We have a project where we need to convert the following file types to
I need to convert minutes (defined as Integer) into the following String format hh:mm
I have the following string which i need to convert to integer or bigint.

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.