0

I know that regular language can be used for pattern matching , context free language is used for syntax matching and context sensitive for semantic or meaning of the sentence . But i have found it hard to visualize how the total process takes place. for example say we want to justify a statement of any language then how should i start to form a full sequential generation of the grammars that correctly depict the language.

what i think is as follows. say we want to first match the first characters of the statement , now we try to feed the input into many of the automata that are operating on the background and then if any of them reaches the final state we have a match and issue a token of its class like is it data type , identifiers etc but at the same time we check that if there is other automata that matches the same pattern like for 'int' there exist two automata that reaches final state one is for keywords and other is identifier but we then check for priority. now after assigning each sequence of characters a class we done with pattern matching and now move on to syntax , now we use CFG but from here i do not know how we will proceed ,so please tell me how we process from here. also if you find anything wrong here tell me, its much appreciated.

rballiwal
  • 329
  • 2
  • 9

0 Answers0