subject

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 }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
What is stored in str after the following code executes? string str = "computer science"; int i = 0; while (i < 8) { if (str.indexof("m") < i) { str = str.substring(0, 2) + str; } i += 2; } computer science cocomputer science cococomputer science cocococomputer science computer scienceco
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
Which law requires employers to provide safe working environments for their employees? a. civil rights act b. fair labor standards act c. occupational safety and health act d. wagner act
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
You know the right answer?
You are designing the syntax for a new language. The language is object oriented and the following e...
Questions
question
Mathematics, 10.03.2021 19:00
question
Mathematics, 10.03.2021 19:00
Questions on the website: 13722361