Problem: Write a YACC program to check whether given string is Palindrome or not.
Explanation:
Yacc (for “yet another compiler compiler.”) is the standard parser generator for the Unix operating system. An open source program, yacc generates code for the parser in the C programming language. The acronym is usually rendered in lowercase but is occasionally seen as YACC or Yacc.
Examples:
Input: naman
Output: palindrome
Input: geeksforgeeks
Output: not palindrome
Lexical Analyzer Source Code :
Parser Source Code:
Output:
👁 Image