#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
|
void | parse_error_at (const char const *buffer, int index, const char *warning_text, const char *text_at_position) |
| Display a warning indicating that something wasn't where it was expected in a FE.
|
|
void | parse_error_at_expected (const char const *buffer, int index, const char *expected, const char *assumed) |
| Display a warning indicating that something wasn't where it was expected in some input text.
|
|
◆ _GNU_SOURCE
◆ parse_error_at()
void parse_error_at |
( |
const char const * | buffer, |
|
|
int | index, |
|
|
const char * | warning_text, |
|
|
const char * | text_at_position ) |
Display a warning indicating that something wasn't where it was expected in a FE.
Prints the first "index" chars of "buffer", with a marker underneath position index+1.
- Parameters
-
[in] | buffer | The text of the FE. Tabs, newlines etc. are OK. |
[in] | index | The number of characters into the FE where the problem occurred. |
[in] | warning_text | The text to display on the line "introducing" the error. |
[in] | text_at_position | The text to display immediately after the marker indicating the location of the error. |
◆ parse_error_at_expected()
void parse_error_at_expected |
( |
const char const * | buffer, |
|
|
int | index, |
|
|
const char * | expected, |
|
|
const char * | assumed ) |
Display a warning indicating that something wasn't where it was expected in some input text.
Prints at least the first "index" chars of "buffer", and continues up to the following newline, then displays a marker and an error message.
- Parameters
-
[in] | buffer | The text of the FE. Tabs, newlines etc. are OK. |
[in] | index | The number of characters into the FE where the problem occurred. |
[in] | expected | A description of what was expected at that location. |
[in] | assumed | What we assumed was there. |