Question

Design a language description for which a BNF/EBNF based grammar cannot be written. Prove that the...

Design a language description for which a BNF/EBNF based grammar cannot be written. Prove that the grammar cannot be written for the description.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The EBNF is the most commonly used formalism to describe the structure of languages.

What is the EBNF?
The EBNF is a way to specify a formal language grammar. It can be considered a metalanguage because it is a language to describe other languages.
A formal language is a language with a precise structure, like programming languages, data languages, or Domain Specific Languages (DSLs). Java, XML, and CSS are all examples of formal languages.
A grammar can be used to define two opposite things:
how to recognize the different portions in a piece of code written in the formal language
the possible ways to build a valid piece of code in the formal language
For example, a simple grammar could tell us that a document in our language is composed by a list of declarations, and declarations are defined by the sequence of a keyword Xyz and a a name.
Based on this we could:
recognize in the code sequences of the keyword Xyz and a name as instances of these declarations we have considered
we could generate valid documents in our language by writing a list of declarations, each time inserting a keyword Xyz and a name
While there are two possible usages for a grammar, we are typically interested only in the first one: recognizing if a piece of code is valid for a given language and identifying the different structures typical of the language (like functions, methods, classes, etc.).

Add a comment
Know the answer?
Add Answer to:
Design a language description for which a BNF/EBNF based grammar cannot be written. Prove that the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT