Mind guys if you could help me on creating this program(regards with file handling).
starting with this:
for instance. i have a .txt file that contains these:
lexeme token
main - Identifier
( - Open Parenthesis
) - Close Parenthesis
{ - Open Curly Bracket
printf - Keyword
( - Open Parenthesis
"Hello world!" - Inside Argument
) - Close Parenthesis
; - Delimeter
} - Close Curly Bracket
This is called "symbol table"
So basically, when this is on code form, it would be this:
main()
{
printf("Hello world!");
}
So, i need create a program that will interpret the source code (obviously the input/output, logical. like 1+1, then it would just output the '2') using the symbol table.