-q is actually respected

This commit is contained in:
anon 2023-11-19 00:18:30 +01:00
parent 0521e58d1f
commit f6668aa9fe
3 changed files with 6 additions and 8 deletions

View File

@ -24,8 +24,8 @@ void _ECHO_CANDIDATE(){
static const char COMMENT_START[] = "<!--";
static const char COMMENT_END[] = "-->";
static const char ATTRIBUTE_VALUE_START[] = "'";
static const char ATTRIBUTE_VALUE_END[] = "'";
const char DEFAULT_QUOTE = '\'';
char quote = DEFAULT_QUOTE;
static unsigned short current_unicode_size;
@ -60,7 +60,6 @@ void pop_tag() {
%x BODY HEAD HEAD_VALUE
%x COMMENT COMMENT_MULTILINE
%x IGNORE IGNORE_COUNT_START IGNORE_COUNT_END
%x STRING
%s UNICODE
ws [ \t\r\v\f]
@ -171,7 +170,7 @@ unicode [\300-\364]
}
:{wsnl}* {
ECHOC('=');
ECHOS(ATTRIBUTE_VALUE_START);
ECHOC(quote);
BEGIN HEAD_VALUE;
}
.|\n {
@ -181,11 +180,11 @@ unicode [\300-\364]
<HEAD_VALUE>{
, {
ECHOS(ATTRIBUTE_VALUE_END);
ECHOC(quote);
BEGIN HEAD;
}
\) {
ECHOS(ATTRIBUTE_VALUE_END);
ECHOC(quote);
yyless(0);
BEGIN HEAD;
}

View File

@ -22,8 +22,6 @@ extern std::stack<std::string> tag_stack;
DECLARE_LEXER(csml);
DECLARE_LEXER(xml);
const char DEFAULT_QUOTE = '\'';
char quote = DEFAULT_QUOTE;
char * output = NULL;
char * input = NULL;
const char * const csml_extension = ".csml";

View File

@ -24,6 +24,7 @@ bool do_ignore(const std::string &current_tag) {
extern int ignore_count; // number of '{' / '}'s to be placed around the current ignored block
extern int ignore_i; // number of '}'s so far
extern std::string buffer;
extern char quote;
#define SCANNER_H
#endif