BNF Exercises - Problem 1

Problem

Write a syntactic specification using Backus-Naur Form to describe the mini-language with the following description:

Simple expressions limited to the variable identifiers x, y, or z, that contain the operations of addition (+), subtraction (-), and unary negation (~) together with parentheses.

Valid strings would include ~x+~y or (x+z-y)


Last updated 2001/03/15
© J.A.N. Lee, 2001.