mirror of
https://github.com/opnsense/src.git
synced 2026-03-27 13:13:13 -04:00
Remove procedural code that did the scanning, which was faulty and didn't support complex constants such as 0x1p-61. Replace it with a finite state machine expressed as a transition table. The table was rewritten by hand from lx's output, given parts of grammar expressed as regular expressions. lx is Katherine Flavel's lexer generator, currently available at https://github.com/katef/libfsm and the parts of grammar were taken from http://quut.com/c/ANSI-C-grammar-l-2011.html and extended to support binary integer constants which are a popular GCC extension. Reported by: bde
9 lines
153 B
Text
9 lines
153 B
Text
/* $FreeBSD$ */
|
|
void
|
|
t(void)
|
|
{
|
|
unsigned long x = 314UL;
|
|
double y[] = {0x1P+9F, 0.3, .1, 1.2f, 0xa.p01f, 3.14f, 2.L};
|
|
int z = 0b0101;
|
|
DO_NOTHING;
|
|
}
|