.. _Grammars3: .. raw:: html .. |--| unicode:: U+2013 .. en dash .. |---| unicode:: U+2014 .. em dash, trimming surrounding whitespace :trim: .. This file is part of the OpenDSA eTextbook project. See .. http://algoviz.org/OpenDSA for more details. .. Copyright (c) 2012-13 by the OpenDSA Project Contributors, and .. distributed under an MIT open source license. .. avmetadata:: :author: David Furcy and Tom Naps ============================ Grammars - Part 3 (F 2/5/16) ============================ RP 3 part 1 ----------- Topics of the day: 1. Operator precedence 2. EBNF extensions and their advantages The review problem set for today contains five review problems. This problem illustrates how grammatical structure influences the evaluation of arithmetic expressions, and thus the meaning of programs. Note that, **to get credit for this problem,** you must solve it correctly three times in a row (the question is randomized). .. avembed:: Exercises/PL/RP3part1.html ka :module: Grammars3 :long_name: RP set #3, question #1 :points: 1.0 :required: True :threshold: 3.0 :exer_opts: JXOP-debug=true&JOP-lang=en RP 3 part 2 ----------- This problem demonstrates how grammatical structure impacts the associativity property of arithmetic operators. .. avembed:: Exercises/PL/RP3part2.html ka :module: Grammars3 :long_name: RP set #3, question #2 :points: 1.0 :required: True :threshold: 1.0 :exer_opts: JXOP-debug=true&JOP-lang=en RP 3 part 3 ----------- This problem illustrates how grammatical structure impacts the associativity property and order of precedence of arithmetic operators. .. avembed:: Exercises/PL/RP3part3.html ka :module: Grammars3 :long_name: RP set #3, question #3 :points: 1.0 :required: True :threshold: 1.0 :exer_opts: JXOP-debug=true&JOP-lang=en RP 3 part 4 ----------- This problem asks you to provide a characterization in English of the language generated by a BNF grammar. .. avembed:: Exercises/PL/RP3part4.html ka :module: Grammars3 :long_name: RP set #3, question #4 :points: 1.0 :required: True :threshold: 1.0 :exer_opts: JXOP-debug=true&JOP-lang=en RP 3 part 5 ----------- This problem is about the equivalence between a given BNF grammar (the same one as in part 4 above) and a smaller EBNF grammar. .. avembed:: Exercises/PL/RP3part5.html ka :module: Grammars3 :long_name: RP set #3, question #5 :points: 1.0 :required: True :threshold: 1.0 :exer_opts: JXOP-debug=true&JOP-lang=en .. odsascript:: Exercises/PL/RP3part1.js