llconf  0.0.2
Functions
parseerror.h File Reference

Functions

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. More...
 
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. More...
 

Function Documentation

◆ 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]bufferThe text of the FE. Tabs, newlines etc. are OK.
[in]indexThe number of characters into the FE where the problem occurred.
[in]warning_textThe text to display on the line "introducing" the error.
[in]text_at_positionThe 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]bufferThe text of the FE. Tabs, newlines etc. are OK.
[in]indexThe number of characters into the FE where the problem occurred.
[in]expectedA description of what was expected at that location.
[in]assumedWhat we assumed was there.