I am learning about context free grammars and have been through few texts in a undetailed manner on these topic . I think I should know the exact , rigorous ,technical definition of what exactly a "grammar" means .

I could see that ,in all of these lessons, a sequence of equations as follow :

 a = bc
 b = ed
 c = gh

I was tempted to conclude that "a grammar is a collection of symbols which are related by a set of equations which dictate rules for substitution of a symbol by a series of symbols "

Then I got to know that , not in all series of equations can we substitute one symbol by a series of another symbol .We can do it only in case of "context-free grammars " . Then I went through one of the stackexchange post and through a brilliant answer got to know what context free exactly means .

So , I thought before I proceed ahead I better seek for the exact rigorous definition of a grammar . What exactly is the mathematical/technical definition of a grammar ?

  • 3
    $\begingroup$ Any textbook covering formal languages provides a formal definition of a grammar, i.e., regular, context-free, context sensitive, etc. What is unclear with these definitions? Why do you think they are not "mathematical/technical "? $\endgroup$ – fade2black Nov 1 '17 at 20:35
  • $\begingroup$ @fade2black : Need to check my book again . Actually it's not a book on theory of formal languages but is basically headed towards compiler design . $\endgroup$ – Eddie Dorphy Nov 15 '17 at 19:27

A grammar is a set of production rules for symbol sequences.

But you knew that already. If you edit the question to make it more specific, we can offer more specific answers.

| cite | improve this answer | |
  • $\begingroup$ J.H : For the time being , that's it about grammar . Just wanted to be sure what I am concluding is correct . $\endgroup$ – Eddie Dorphy Nov 15 '17 at 19:25
  • $\begingroup$ I like this kind of answer; it is concise and clear. $\endgroup$ – David A. Gray Dec 2 '17 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.