Skip to content

Commit 62b616f

Browse files
committed
Link to yacckinds section, remove extra documentation rows
1 parent be067d9 commit 62b616f

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

doc/src/lexextensions.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ and set limits.
1010
Boolean flags are specified by their name, and can be negated by prefixing with `!`
1111
other flags should specify their value immediately after the flag name.
1212

13+
1314
## Example
15+
1416
```
1517
%grmtools {
1618
allow_wholeline_comments
@@ -20,30 +22,33 @@ other flags should specify their value immediately after the flag name.
2022
%%
2123
. "rule"
2224
```
23-
## List of flags:
2425

25-
| Flag | Value | Required | Regex[^regex] |
26-
|---------------------------|-------|----------|---------------|
27-
| `posix_escapes` | bool | ✗ | ✗ |
28-
| Enable compatibility with posix escape sequences. |
29-
| `allow_wholeline_comment` | bool | ✗ | ✗ |
30-
| Enables c++ style `// comments` at the start of lines. |
31-
| The `/` character may require escaping when used in a regex. |
32-
| `case_insensitive` | bool | ✗ | ✓ |
33-
| `dot_matches_new_line` | bool | ✗ | ✓ |
34-
| `multi_line` | bool | ✗ | ✓ |
35-
| `octal` | bool | ✗ | ✓ |
36-
| `swap_greed` | bool | ✗ | ✓ |
37-
| `ignore_whitespace` | bool | ✗ | ✓ |
38-
| `unicode` | bool | ✗ | ✓ |
39-
| `size_limit` | usize | ✗ | ✓ |
40-
| `dfa_size_limit` | usize | ✗ | ✓ |
41-
| `nest_limit` | u32 | ✗ | ✓ |
4226

27+
## List of flags:
4328

29+
| Flag | Value | Required | Regex[^regex] |
30+
|-------------------------------|-------|----------|---------------|
31+
| `posix_escapes`[^] | bool | ✗ | ✗ |
32+
| `allow_wholeline_comment`[^] | bool | ✗ | ✗ |
33+
| `case_insensitive` | bool | ✗ | ✓ |
34+
| `dot_matches_new_line` | bool | ✗ | ✓ |
35+
| `multi_line` | bool | ✗ | ✓ |
36+
| `octal` | bool | ✗ | ✓ |
37+
| `swap_greed` | bool | ✗ | ✓ |
38+
| `ignore_whitespace` | bool | ✗ | ✓ |
39+
| `unicode` | bool | ✗ | ✓ |
40+
| `size_limit` | usize | ✗ | ✓ |
41+
| `dfa_size_limit` | usize | ✗ | ✓ |
42+
| `nest_limit` | u32 | ✗ | ✓ |
43+
44+
[^]: Enable compatibility with posix escape sequences.
45+
[^]: Enables rust style `// comments` at the start of lines.
46+
Which requires escaping of `/` when used in a regex.
4447
[^regex]: ✓ Flag gets passed directly to `regex::RegexBuilder`.
4548

49+
4650
## Flags affecting Posix compatibility
51+
4752
As discussed in [Lex compatibility](lexcompatibility.md) the default behaviors of grmtools and rust's regex
4853
library have differed from that of posix lex.
4954

doc/src/yaccextensions.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
At the beginning of a `.y` file is a `%grmtools{}` section, by default this section is required.
44
But a default can be set or forced by using a `YaccKindResolver`.
55

6-
| Flag | Value | Required |
7-
|---------------------------|-----------|--------------|
8-
| `yacckind` | YaccKind | ✓ |
6+
| Flag | Value | Required |
7+
|------------|---------------------------------------------|--------------|
8+
| `yacckind` | [YaccKind](yacccompatibility.md#yacckinds) | ✓ |
99

10-
`YaccKind` Values
11-
* Grmtools
12-
* Original(NoAction)
13-
* Original(UserAction)
14-
* Original(GenericParseTree)
1510

1611
## Example
12+
1713
```
1814
%grmtools{yacckind Grmtools}
1915
%%

0 commit comments

Comments
 (0)