179k views
0 votes
You are designing the syntax for a new language. The language is object oriented and the following example presents the definition of a class. In this example "my_class_name" is the name of the class that can be created by the programmer and it can be any name consisting of alphanumeric characters and underscores. In the parentheses, the programmer can define multiple variables separated by commas. A variable name can consist of any combination of alphanumeric characters and underscores. In the curly brackets the programmer can write any statement from the language. At this point the requirements for statements are not ready yet. Therefore, we do not need to write grammar rules for the statements, we only use a non-terminal to indicate their existence. The word "defclass" is a keyword in the language. Variable names or class names can be of any length

Write BNF rules to specify the class definition in this language. Here is an example of such definition:
defclass my_class_name (width, length) { statements }

User Moljac
by
5.2k points

1 Answer

3 votes

Answer:

yes

Step-by-step explanation:

indeed i am the big gluck gluck

User Sunita
by
4.6k points