| 93 | } |
| 94 | |
| 95 | SMCError TextParsers::ParseFile_SMC(const char *file, ITextListener_SMC *smc, SMCStates *states) |
| 96 | { |
| 97 | FILE *fp = fopen(file, "rt"); |
| 98 | |
| 99 | if (!fp) |
| 100 | { |
| 101 | if (states != NULL) |
| 102 | { |
| 103 | states->line = 0; |
| 104 | states->col = 0; |
| 105 | } |
| 106 | return SMCError_StreamOpen; |
| 107 | } |
| 108 | |
| 109 | SMCError result = ParseStream_SMC(fp, FileStreamReader, smc, states); |
| 110 | |
| 111 | fclose(fp); |
| 112 | |
| 113 | return result; |
| 114 | } |
| 115 | |
| 116 | SMCError TextParsers::ParseSMCFile(const char *file, |
| 117 | ITextListener_SMC *smc_listener, |