jhjourdan / C11parser

A correct C89/C90/C99/C11/C18 parser written using Menhir and OCaml
Other
192 stars 17 forks source link

Incorrect lexing of character literals #22

Closed JoJoDeveloping closed 2 years ago

JoJoDeveloping commented 2 years ago

According to 6.4.4.4, we have

character-constant: ​ ​ ​ ' c-char-sequence '

c-char-sequence: ​ ​ ​ c-char ​ ​ ​ c-char-sequence c-char

However, the lexer currently accepts '' as an empty char constant.

jhjourdan commented 2 years ago

Thanks, you're right.

Fixed in 545e2df.