title: How to check a sentence is meaning full or not using LEX & YACC
body: <p>I am designing a tool (in LEX &amp; YACC) to check whether the entered sentence by the user is grammatically right or not. How to check a sentence whether it is meaning full or not.
  My tool recognizes the pattern of the sentence.
  Eg: For the pattern s+v+o
  "I am reading the book" is RIGHT sentence!
  But "I am drinking the book" matches with the pattern which is not meaning full!
  How to give the rules for semantic checking of a sentence in YACC?</p>