coan 4.2.4
chew_state_s Struct Reference

Data Fields

chew_public_state_t chew_public_state
size_t single_quote_length
bool escape

Detailed Description

The global state of the Chew component

Definition at line 58 of file chew.c.


Field Documentation

The public state of the component

Definition at line 61 of file chew.c.

Last char read was escape?

Definition at line 78 of file chew.c.

Current number of input characters commencing with the last '\'' that possibly opens a quotation in single quotes, or 0 whenever we are not within such a sequence. If this length ever exceeds 4 within a call to chew(), we conclude that it the sequence is not a quotation but simply characters following a free-standing independant apostrophe, and reset the value to 0.

The sole reason for tracking this length is to identify the 3-character sequence '"' as a quotation of the double-quote character and avoid falsely detecting the start or end of a quotation in double-quotes. The equivalent 4-character sequence '"' is unproblematic because the double-quote will be seen to be escaped.

Definition at line 63 of file chew.c.


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines