Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions