Explain what metasymbols are and discuss their use as part of BNF rules.
What will be an ideal response?
The three symbols <, >, and ::= used as part of BNF rules are termed metasymbols. This means that they are symbols of one language (BNF) that are being used to describe the characteristics of another language.In addition to these three, there are two other metasymbols used in BNF definitions. The vertical bar, |, means OR, and it is used to separate two alternative definitions of a nonterminal. This could be done without the vertical bar by just writing two separate rules:
However, it is sometimes more convenient to use the | character and write a single rule:
For example, the rule
says that an arithmetic operator is defined as either a +, or a ?2-, or an *, or a /. Without the | operator, we would need to write four separate rules, which would make the grammar much larger. Here is a rule that defines the nonterminal
The final metasymbol used in BNF definitions is the Greek character lambda, Ë, which represents the null string-nothing at all. It is possible that a nonterminal can be "empty," and the symbol Ë is used to indicate this. For example, the nonterminal
which says that
You might also like to view...
A database ________ organizes information into fields and records
Fill in the blank(s) with correct word
CSS3 added support for the HSL system, which enables you to create colors by specifying values or percentages for hue, ____, and light.
A. settings B. saturation C. shading D. shadows
COGNITIVE ASSESSMENT Which of the following is NOT true about system units?
A. The case on a smartphone often is in front of the display. B. The case on wearable devices typically consumes the entire device. C. On most laptops, the keyboard and pointing device often are on top of the case. D. Desktops that house the display and system unit in the same case are called all-in-one.
What are some of the differences between the file system concept of Linux and that of other operating systems?
What will be an ideal response?