Question: Show how you would modify the Mini - Triangle production rules as [ 2 0 ] follows: Allow identifiers to contain single embedded @ characters

Show how you would modify the Mini-Triangle production rules as
[20]
follows:
Allow identifiers to contain single embedded @ characters eg. 'set @ up' but not 'set @ @up', nor 'set @', nor '@up')
Allow real-literals eg '3.1416'(but not '3.' nor '.1416')
Mini-Triangle Production Rules
Program ::= single-Command
Command ::= single-Command | Command ; single-Command
single-Command ::= V-name := Expression I Identifier ( Expression )
| if Expression then single-Command else single-Command | while Expression do single-Command let Declaration in single-Command begin Command end
Expression : := primary-Expression | Expression Operator primary-Expression
primary-Expression ::= Integer-Literal | V-name | Operator primary-Expression |.( Expression )
V-name : := ldentifier
Declaration ::= single-Declaration | Declaration ; single-Declaration single-Declaration : := const Identifier - Expression | var Identifier : Type-denoter
Type-denoter ::= Identifier
Operator : :=+|-||*|)/(||)||>||=|1|
Identifier : := Letter | Identifier Letter | 'Identifier Digit Integer-Literal ::= Digit | Integer-Literal Digit Comment : :=! Graphic* eol
 Show how you would modify the Mini-Triangle production rules as [20]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!