(Solved) : Input Grammar Keyboard Txt File Whichever Prefer Write C Code Output List Non Terminals Sy Q35399290 . . .
Input will be the grammar from keyboard or from .txt file(whichever you prefer)
Write C++ code which should output the list ofnon-terminals(symbols on the left side of arrow) followed by thelist of terminals(grammar symbols that don’t appear on the leftside of arrow) in the order in which they appear in the grammarrules from keyboard input or .txt file that has the grammar. Needthis in c++. You should use Vector containers. Make sureyou test your code with the following two examples.

Example: For the input grammar decl-> idList colon ID # idList-> ID ídList1 # İdList 1-> # idList1-> COMMA ID īdList 1 # the expected output for task 1 is: decl idList idList1 colon ID COMMA Example: Given the input grammar: decl-> idList colon ID # idList1-> # idList1-> COMMA ID idList1 # idList-> ID idList1 # the expected output for task 1 is: decl idList idList1 colon ID COMMA Note that in this example, even though the rule for idList1 is before the rule for idList, idList appears before idList1 in the grammar rules Show transcribed image text
Expert Answer
Answer to Input Grammar Keyboard Txt File Whichever Prefer Write C Code Output List Non Terminals Sy Q35399290 . . .
OR