Libraryless. Click here for Pure Java version (2544L/18K/56K).
1 | !759 |
2 | |
3 | static S rules = [[ |
4 | |
5 | case-insensitive |
6 | |
7 | if the available commands are <cmdlist>, which command is <quoted> likely to mean? = question |
8 | |
9 | <quoted> = cmd |
10 | <cmd> = cmdlist |
11 | <cmd> <and> <cmdlist> = cmdlist |
12 | , = and |
13 | and = and |
14 | |
15 | ]]; |
16 | |
17 | p {
|
18 | O parser = newParser(); |
19 | setOpt(parser, "debug", true); |
20 | S input = [[If the available commands are "load", "save" and "quit", which command is "q" likely to mean?]]; |
21 | O parseResult = call(parser, "parse", input, rules); |
22 | printStructure(call(parseResult, "explain", "question")); |
23 | } |
Began life as a copy of #1002418
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1002420 |
| Snippet name: | Parser Test |
| Eternal ID of this version: | #1002420/1 |
| Text MD5: | e15e1fecbe74252617671ed91f0acfe0 |
| Transpilation MD5: | 7cefe122018dd68240fb3e8771b823de |
| Author: | stefan |
| Category: | |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-01-20 22:06:38 |
| Source code size: | 559 bytes / 23 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 873 / 944 |
| Referenced in: | [show references] |