Check EOF when checking a large char set that contains the null character
This commit is contained in:
parent
be6e6d3708
commit
b8701fcf18
1 changed files with 10 additions and 2 deletions
|
|
@ -759,12 +759,20 @@ impl Generator {
|
|||
}
|
||||
|
||||
if let Some(large_char_set_ix) = large_char_set_ix {
|
||||
let large_set = &self.large_character_sets[large_char_set_ix].1;
|
||||
let check_eof = large_set.contains('\0');
|
||||
if check_eof {
|
||||
add!(self, "(!eof && ")
|
||||
}
|
||||
add!(
|
||||
self,
|
||||
"set_contains({}, {}, lookahead)",
|
||||
self.large_character_set_constant_names[large_char_set_ix],
|
||||
self.large_character_sets[large_char_set_ix].1.range_count(),
|
||||
&self.large_character_set_constant_names[large_char_set_ix],
|
||||
large_set.range_count(),
|
||||
);
|
||||
if check_eof {
|
||||
add!(self, ")");
|
||||
}
|
||||
}
|
||||
|
||||
if !asserted_chars.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue