NYU Unambiguous BNF Grammar Rules for Subset of Java Style Method Calls Discussion


Write unambiguous BNF grammar rules for a subset of Java-style method calls. The grammar should obey the following rules: A method can take any number of parameters All parameters are comma separated Each parameter can be a variable, a method call, or a simple arithmetic expression A simple arithmetic expression can be variables/method calls separated by + and * only – no parentheses or other operations Comma-separated and arithmetic expressions are evaluated left-to-right A method call has higher precedence than arithmetic * has higher precedence than + Variables can only be named x, y, z Methods can only be named m1, m2, m3 Nested method calls must be evaluated from the inside out – in m1(m2()), m2 should be evaluated before m1 The start symbol is a method callWrite the rules using the formatting, and make sure your start symbol is the first production. Some legal examples in the language:m1(x, y, z)m2(m1() + m3(), x * m3())m1(m1(m1(m2(x+y))))Some illegal examples:m1(x,)1 + m2()m1(m2 * y)

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

Reviews, comments, and love from our customers and community:

Article Writing

Keep doing what you do, I am really impressed by the work done.



PowerPoint Presentation

I am speechless…WoW! Thank you so much!

Stacy V.

Part-time student

Dissertation & Thesis

This was a very well-written paper. Great work fast.

M.H.H. Tony


Annotated Bibliography

I love working with this company. You always go above and beyond and exceed my expectations every time.

Francisca N.


Book Report / Review

I received my order wayyyyyyy sooner than I expected. Couldn’t ask for more.

Mary J.


Essay (Any Type)

On time, perfect paper

Prof. Kate (Ph.D)


Case Study

Awesome! Great papers, and early!

Kaylin Green


Proofreading & Editing

Thank you Dr. Rebecca for editing my essays! She completed my task literally in 3 hours. For sure will work with her again, she is great and follows all instructions

Rebecca L.


Critical Thinking / Review

Extremely thorough summary, understanding and examples found for social science readings, with edits made as needed and on time. Transparent

Arnold W.




Joshua W.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>