Report and skip non-ASCII characters.

This commit is contained in:
Miguel Lechon
2021-03-14 12:12:30 +01:00
parent e3357f0759
commit 084d55d55d
4 changed files with 24 additions and 3 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ symbol_no_backslash_no_quotes_2 : ';'|'<'|'='|'>'|'?'|'@'|'['|']'|'^'|'_'|'{'|'|
string_literal : @markup '"' [string_literal_items] @markup '"' | @markup '`' [string_literal_items] @markup '`'
string_literal_items : string_literal_item [string_literal_items]
string_literal_item : ascii_no_backslash_no_quotes | '\'' | '\\' ascii
symbol_label : '~'|'!'|'%'|'^'|'&'|'*'|'+'|'-'|'/'|'|'|'<'|'>'|'$'|'='|'.'|'?'|'$'
symbol_label : '~'|'!'|'%'|'^'|'&'|'*'|'+'|'-'|'/'|'|'|'<'|'>'|'$'|'='|'.'|'?'|'_'
/* What follows is a range of annotated grammars that can be used to generate
* tests of increasing complexity and completeness to check against MetaDesk.
+7 -2
View File
@@ -455,9 +455,9 @@ int main(void)
{"a:'''\nmulti-line text literal", {3}},
{"/* foo", {1}},
{"label:@tag {1, 2, 3} /* /* unterminated comment */", {8, 22}},
{"#include <stdio.h>", {2}},
{"@\"tag\" node", {2}},
{"{a,,#b}", {4, 5}},
{"{a,,#b,}", {4, 5}},
{"foo""\x80""bar", {4}},
};
int max_error_count = MD_ArrayCount(tests[0].columns);
@@ -478,6 +478,11 @@ int main(void)
}
e = e->next;
}
if(e && e->next)
{
columns_match = 0;
}
}
TestResult(columns_match);
}