semicolon as character in c++ char array
I'm trying to create a character array which holds a single symbol per
array index with the following code:
#ifndef TABLEDEFS_H
#define TABLEDEFS_H
#include <string>
using namespace std;
char symbolTable[] = {'_', '=', '<', '>', '!', '+', '-', '*', '/', '%', '.',
'(', ')', ',', '{', '}', ';', '[', ']', ':'};
string tokenTable[] = {"IDtk", "NUMtk", "==", "=<=", "=>=", "=", "<", ">",
"!",
"+", "-",
"*", "/", "%", ".", "(", ")", ",", "{", "}", ";", "[", "]", ":", "EOFtk"};
string keywordTable[] = {"Start", "Stop", "Then", "If", "Iff", "While",
"Var", "
Int", "Float", "Do",
"Read", "Write", "Void", "Return", "Dummy", "Program"};
No comments:
Post a Comment