public SourceCompiler() { var keywords = new ObservableCollection <string>() { "procedure", "var", "Byte", "Char", "array", "of", "Longint", "String", "Begin", "if", "and", "then", "else", "End", "or" }; var delimiters1 = new ObservableCollection <string>() { ".", ";", ":", "[", "]", "=", "(", ")", ",", "-", ">", "<" }; var delimiters2 = new ObservableCollection <string>() { "..", ":=" }; var delimiterString = '\''; Scanner = new Scanner(keywords, delimiters1, delimiters2, delimiterString); WfpGenerator = new WfpGenerator(); Parser = new Parser(Scanner, WfpGenerator); }
public Parser(Scanner scanner, WfpGenerator wfpGenerator) { lexemes = scanner.Lexemes; wfp = wfpGenerator; }