Get Lexical Analyzer Generator Quex at SourceForge.net. Fast, secure and Free Open Source software downloads

Previous topic

Usage Scenerios

Next topic

Usage

Number FormatΒΆ

Numbers in quex are specified in a way similar to what is common practice in many programming languages such as C, Python, Java, etc. – with some convenient extensions. Number formats are as follows:

Example 4711

Normal decimal integers do not start with ‘0’ and have none of the prefixes below.

0x, Example 0xC0.FF.EE

Hexadecimal numbers need to be preceeded by ‘0x’. The dots inside the hexadecimal numbers are meaningless for the parser, but may facilitate the reading for the human reader.

0x, Example 0o751

Octal numbers are preceeded by ‘0o’.

0b, Example 0b100.1001

Binary numbers are preceeded by ‘0b’. Again, redundant dots may facilitate the human interpretation of the specified number.

0r, Example 0rXMVIII or 0rvii

Roman numbers must be preceeded by a ‘0r’ prefix.