ABNF Parser Generator
Tutorial 2 - Confguring the Input Mode
Since the HTML textarea elements used for parser input accept only ASCII text, a special format must be used to code non-ASCII characters. This exercise will demonstrate that format. Click on Generate and follow the instructions below.
Click on Parse and then examine the Parsed String in the output below. You can see that the input string character codes were actually interpreted from the integers represented and not as the literal ASCII characters that they are. The input format is simply a delimited string of integers. Integers may be in hexidecimal (leading 0x) or decimal (no leading zeros) format. Delimiters may one or more space, comma, new line character or any combination thereof.
Now click on Configure. In the configuration window notice that Input Mode: has "auto" selected by default. This mode will normally (but not always) be able to detect which format to interpret the input string with. The Input Mode allows you to manually pick the input string format. Select "ascii" and save. Again click Parse and note that the parse fails. Click again on Parsed String and you will see that the input string was interpreted literally and as such does not match the grammar specification. Repeat, selecting "hex" mode instead, and see that the first result is duplicated.
|
|