Computer Science, asked by kabilan7154, 1 year ago

The two mathematical models of language description are generationand recognition. Describe how each can define the syntax of a program-ming language.

Answers

Answered by sabhyata09
1

The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a program- ming language. syntax error refers to an error in the syntax of a sequence of which is written in a particular programming language.

Answered by oladoja14
0

Answer:

Explanation:

Recognition:

This works on a yes or no basis. It makes use of a mechanism called the recognizer to identify if input string can be found in given alphabet.

This indicates if the input string is in the language or not, this serves as the basis for the string being accepted or rejected. The recognizer also filters correctly formed sentences from incorrectly formed one.

The recognizer is used in syntactical analysis, it doesn't check for all possible strings but checks if the given program strings are in language or not.

Generation:

A device (mechanism) called a generator is used to generate correct sentences in a language. Whenever a generator is called it generates a sentence that is somewhat unpredictable.

To check for the correctness of an input sentence, the generator first generates the correct sentence according to the language and then compares it with the input string.

Similar questions