diff --git a/README.md b/README.md new file mode 100644 index 0000000..a340f34 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +tree-sitter-vimdoc +================== + +This grammar intentionally support a subset of the vimdoc "spec"; predictable +results are the primary goal, so that _output_ formats (e.g. HTML) are +well-formed; the _input_ (vimdoc) is secondary. The first step should always be +to try to fix the input (within reason) rather than insist on a grammar that +handles vimdoc's endless quirks. + +Notes +----- + +- vimdoc format "spec": + - [:help help-writing](https://neovim.io/doc/user/helphelp.html#help-writing) + - https://github.com/nanotee/vimdoc-notes +- whitespace is intentionally captured in `(word)`, because it is often necessary to be + able to correctly layout vim help files (especially old/legacy). +- `(codeblock)` is contained by `(line)` because `>` can start a code block at the end of a line. +- `(column_heading)` is contained by `(line)` because `>` (to close + a `(codeblock)` can appear at the start of `(column_heading)`. +- `h1` ("Heading 1"): `======` followed by text and optional `*tags*`. +- `h2` ("Heading 2"): `------` followed by text and optional `*tags*`. +- `h3` ("Heading 3"): only UPPERCASE WORDS, followed by optional `*tags*`. + +Known issues +------------ + +- `line_li` ("list item") is _experimental_. It doesn't support nesting yet and + it may not work well; you can treat it as a normal `line` for layout purposes. +- `codeblock` ">" must not be preceded only by tabs, a space char is required (" >"). + See `:help lcs-tab` for example. Currently the grammar doesn't enforce this. +- `codeblock` terminated by an "implicit stop" (i.e. no terminating `<`) + consumes the first char of the terminating line, and continues the parent + `block`, preventing top-level forms like `h1`, `h2` from being recognized + until a blank line is encountered. +- `line` in a `codeblock` does not contain `word` atoms, it's just the full + raw text line including whitespace. This is somewhat dictated by its + "preformatted" nature; parsing the contents would require loading a "child" + language (injection). See [#2](https://github.com/vigoux/tree-sitter-vimdoc/issues/2). +- `url` doesn't handle _surrounding_ parens. E.g. `(https://example.com/#yay)` yields `word` +- `url` doesn't handle _nested_ parens. E.g. `(https://example.com/(foo)#yay)` +- Ideally `block_end` should consume the last block of the document _only_ if that + block is missing a trailing blank line or EOL ("\n"). + - TODO: consider simply _not supporting_ docs without EOL? +- Ideally `line_noeol` should consume the last line of the document _only_ if + that line is missing EOL ("\n"). + - TODO: consider simply _not supporting_ docs without EOL? + +TODO +---- + +- `line_noeol` is a special-case to support documents that don't end in EOL. + Grammar could be a bit simpler if we just require EOL at end of document. +- `line_modeline` (only at EOF) diff --git a/corpus/arguments.txt b/corpus/arguments.txt index cd21063..14440bb 100644 --- a/corpus/arguments.txt +++ b/corpus/arguments.txt @@ -1,31 +1,53 @@ ================================================================================ -Simple argument +simple argument ================================================================================ This in an argument: {arg} -------------------------------------------------------------------------------- (help_file - (line - (word) - (word) - (word) - (word) - (argument - (word)))) + (block + (line + (word) + (word) + (word) + (word) + (argument + (word))))) ================================================================================ -Multiple arguments on the same line +multiple arguments on the same line ================================================================================ - {foo} {bar} {baz} -------------------------------------------------------------------------------- (help_file - (line - (argument - (word)) - (argument - (word)) - (argument + (block + (line + (argument + (word)) + (argument + (word)) + (argument + (word))))) + +================================================================================ +NOT an argument +================================================================================ +{foo "{bar}" `{baz}` |{baz| } {} + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (argument + (word) + (ERROR)) + (word) + (codespan + (word)) + (taglink + (word)) + (word) (word)))) diff --git a/corpus/backtick.txt b/corpus/backtick.txt deleted file mode 100644 index 3f00255..0000000 --- a/corpus/backtick.txt +++ /dev/null @@ -1,45 +0,0 @@ -================================================================================ -Simple backtick -================================================================================ - -`foobar` - --------------------------------------------------------------------------------- - -(help_file - (line - (backtick - (word)))) - -================================================================================ -Backtick in text -================================================================================ - -Hello `world`, I am a markup language - --------------------------------------------------------------------------------- - -(help_file - (line - (word) - (backtick - (word)) - (word) - (word) - (word) - (word) - (word) - (word))) - -================================================================================ -Backtick with command inside -================================================================================ - -`:echo` - --------------------------------------------------------------------------------- - -(help_file - (line - (backtick - (word)))) diff --git a/corpus/code_block.txt b/corpus/code_block.txt deleted file mode 100644 index a180bee..0000000 --- a/corpus/code_block.txt +++ /dev/null @@ -1,96 +0,0 @@ -================================================================================ -Simple code block -================================================================================ -> - abcabcabc -< --------------------------------------------------------------------------------- - -(help_file - (code_block)) - -================================================================================ -Code block with text before -================================================================================ -This code: > - abc -< --------------------------------------------------------------------------------- - -(help_file - (line - (word) - (word) - (code_block))) - -================================================================================ -Code block with implicit stop -================================================================================ -> - abc - -Blehke --------------------------------------------------------------------------------- - -(help_file - (code_block) - (line - (word))) - -================================================================================ -Strange codeblock -================================================================================ - -Note that in the command: > - :if "foo" - :" NOT executed -"foo" is converted to 0, which means FALSE. If the string starts with a -non-zero number it means TRUE: > - :if "8foo" - :" executed -To test for a non-empty string, use empty(): > - :if !empty("foo") -< - --------------------------------------------------------------------------------- - -(help_file - (line - (word) - (word) - (word) - (word) - (word) - (code_block)) - (line - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word)) - (line - (word) - (word) - (word) - (word) - (word) - (code_block)) - (line - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (word) - (code_block))) diff --git a/corpus/codeblock.txt b/corpus/codeblock.txt new file mode 100644 index 0000000..ee5b589 --- /dev/null +++ b/corpus/codeblock.txt @@ -0,0 +1,245 @@ +================================================================================ +simple codeblock +================================================================================ +> + 1.1 +< + +block2: +> + 2.1 +< foo + +block3: +> + 3.1 +< + + text +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (codeblock + (line)))) + (block + (line + (word)) + (line + (codeblock + (line))) + (line + (word))) + (block + (line + (word)) + (line + (codeblock + (line)))) + (block + (line + (word)))) + +================================================================================ +codeblock with text before +================================================================================ +This code: > + code-line1 + code-line2 + code-line3 +< + +From luaref.txt: + + (see |luaref-luaL_newstate|). +> + static void *l_alloc (void *ud, void *ptr) { + return NULL; + } +< + +text + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (codeblock + (line) + (line) + (line)))) + (block + (line + (word) + (word))) + (block + (line + (word) + (taglink + (word)) + (word)) + (line + (codeblock + (line) + (line) + (line)))) + (block + (line + (word)))) + +================================================================================ +codeblock with implicit stop (FIXME) +================================================================================ +> + line1 + line2 + +------------------------------- +h1-headline *foo* + +------------------------------- +h1-headline *foo* + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (codeblock + (line) + (line) + (line))) + (line + (word)) + (line + (word) + (tag + (word)))) + (h2 + (word) + (tag + (word)))) + +================================================================================ +codeblock with empty lines +================================================================================ + +Example: > + + let buf = nvim_create_buf(v:false, v:true) + call nvim_buf_set_lines(buf, 0, -1, v:true, ["test", "text"]) + + let opts = {'relative': 'cursor', 'width': 10, 'height': 2, 'col': 0, + \ 'row': 1, 'anchor': 'NW', 'style': 'minimal'} + + let win = nvim_open_win(buf, 0, opts) + call nvim_win_set_option(win, 'winhl', 'Normal:MyHighlight') +x + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (codeblock + (line) + (line) + (line) + (line) + (line) + (line) + (line) + (line) + (line))))) + +================================================================================ +tricky codeblock +================================================================================ +> + line1 > + line2 + < line3 +< + +tricky +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (codeblock + (line) + (line) + (line)))) + (block + (line + (word)))) + +================================================================================ +strange codeblock +================================================================================ + +Note that in the command: > + :if "foo" + :" NOT executed +"foo" is converted to 0, which means FALSE. If the string starts with a +non-zero number it means TRUE: > + :if "8foo" + :" executed +To test for a non-empty string, use empty(): > + :if !empty("foo") +< + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word) + (word) + (word) + (codeblock + (line) + (line))) + (line + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word)) + (line + (word) + (word) + (word) + (word) + (word) + (codeblock + (line) + (line))) + (line + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (codeblock + (line))))) diff --git a/corpus/codespan.txt b/corpus/codespan.txt new file mode 100644 index 0000000..28ec04b --- /dev/null +++ b/corpus/codespan.txt @@ -0,0 +1,92 @@ +================================================================================ +simple codespan +================================================================================ + +a `foobar` b `:echo` + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (codespan + (word)) + (word) + (codespan + (word))))) + +================================================================================ +codespan in text +================================================================================ + +Hello `world`, I am `markup language`. But `this is +an error`. + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (codespan + (word)) + (word) + (word) + (word) + (codespan + (word)) + (word) + (word) + (codespan + (word) + (MISSING "`"))) + (line + (word) + (word)))) + +================================================================================ +NOT a codespan +================================================================================ + *'* *'a* *`* *`a* +'{a-z} `{a-z} Jump to the mark. + *g'* *g'a* *g`* *g`a* +g'{mark} g`{mark} + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (tag + (word)) + (tag + (word)) + (tag + (word)) + (tag + (word))) + (ERROR) + (line + (argument + (word)) + (word) + (word) + (word) + (word)) + (line + (tag + (word)) + (tag + (word)) + (tag + (word)) + (tag + (word))) + (line + (word) + (argument + (word)) + (word) + (argument + (word))))) diff --git a/corpus/column_heading.txt b/corpus/column_heading.txt deleted file mode 100644 index bf3aa2d..0000000 --- a/corpus/column_heading.txt +++ /dev/null @@ -1,71 +0,0 @@ -================================================================================ -Simple uppercase heading -================================================================================ -HELLO - -Test --------------------------------------------------------------------------------- - -(help_file - (column_heading - (uppercase_name)) - (line - (word))) - -================================================================================ -Multiple words uppercase heading -================================================================================ -HELLO WORLD - -Test --------------------------------------------------------------------------------- - -(help_file - (column_heading - (uppercase_name)) - (line - (word))) - -================================================================================ -Heading with tag -================================================================================ -HELLO WORLD *abc* - -Test --------------------------------------------------------------------------------- - -(help_file - (column_heading - (uppercase_name) - (tag - (word))) - (line - (word))) - -================================================================================ -Heading lowercase -================================================================================ -Test~ - -Below --------------------------------------------------------------------------------- - -(help_file - (column_heading - (column_name)) - (line - (word))) - -================================================================================ -Heading with multiple words -================================================================================ -Multiple words~ - -Bleh --------------------------------------------------------------------------------- - -(help_file - (column_heading - (column_name)) - (line - (word))) diff --git a/corpus/heading1_2.txt b/corpus/heading1_2.txt new file mode 100644 index 0000000..5dc54d8 --- /dev/null +++ b/corpus/heading1_2.txt @@ -0,0 +1,136 @@ +================================================================================ +h1 h2 heading +================================================================================ + +============================================================================== +Heading1 *heading1* + +Text + +----------------------------------------------------------------------- +Heading two *tag2.1* *tag2.2* + +Text2 + +-------------------------------------------------------------------------------- + +(help_file + (h1 + (word) + (tag + (word))) + (block + (line + (word))) + (h2 + (word) + (word) + (tag + (word)) + (tag + (word))) + (block + (line + (word)))) + +================================================================================ +h1 h2 heading with tag at the start +================================================================================ + +============================================================================== +*03.1* Word movement + +Text + +------------------------------------------------------------------------------ +*05.6* heading two + +Text + +-------------------------------------------------------------------------------- + +(help_file + (h1 + (tag + (word)) + (word) + (word)) + (block + (line + (word))) + (h2 + (tag + (word)) + (word) + (word)) + (block + (line + (word)))) + +================================================================================ +NOT h1 h2 heading +================================================================================ + +==== +Not-a-heading-1 *heading1* + +Text + +--- +Not-a-heading-2 more words *heading2* + +Text + +===========a======b========3089uaafaewf_-----awefpoij=========================== +Not-a-heading-3 *heading3* + +Text + +------------===============--------------------================================= +Not-a-heading-4 *heading4* +Text + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word)) + (line + (word) + (tag + (word)))) + (block + (line + (word))) + (block + (line + (word)) + (line + (word) + (word) + (word) + (tag + (word)))) + (block + (line + (word))) + (block + (line + (word)) + (line + (word) + (tag + (word)))) + (block + (line + (word))) + (block + (line + (word)) + (line + (word) + (tag + (word))) + (line + (word)))) diff --git a/corpus/heading3-column_heading.txt b/corpus/heading3-column_heading.txt new file mode 100644 index 0000000..c22b1e0 --- /dev/null +++ b/corpus/heading3-column_heading.txt @@ -0,0 +1,183 @@ +================================================================================ +h3 (uppercase) heading +================================================================================ +HELLO + +Test + +GUI ~ +Text +-------------------------------------------------------------------------------- + +(help_file + (h3 + (uppercase_name)) + (block + (line + (word))) + (block + (line + (column_heading + (uppercase_name))) + (line + (word)))) + +================================================================================ +h3 (uppercase) heading, multiple words +================================================================================ +HELLO WORLD + + LEADING-SPACE-NOT-A-HEADING +-------------------------------------------------------------------------------- + +(help_file + (h3 + (uppercase_name)) + (block + (line + (word)))) + +================================================================================ +h3 heading with tag +================================================================================ +HELLO WORLD *abc* + +Test +-------------------------------------------------------------------------------- + +(help_file + (h3 + (uppercase_name) + (tag + (word))) + (block + (line + (word)))) + +================================================================================ +column_heading lowercase +================================================================================ +Test~ + +Below +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (column_heading + (word)))) + (block + (line + (word)))) + +================================================================================ +column_heading with multiple words +================================================================================ +Multiple words~ + +text + +nvim_ui_try_resize({width}, {height}) *nvim_ui_try_resize()* + TODO: Documentation + + Attributes: ~ + |RPC| only +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (column_heading + (word) + (word)))) + (block + (line + (word))) + (block + (line + (word) + (argument + (word)) + (word) + (argument + (word)) + (word) + (tag + (word))) + (line + (word) + (word))) + (block + (line + (column_heading + (word))) + (line + (taglink + (word)) + (word)))) + +================================================================================ +column_heading should NOT parse atoms (links, tags, etc.) (FIXME) +================================================================================ + Example: > + echo spellbadword("the quik brown fox") +< 'quik', 'bad' ~ + + Text. + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (codeblock + (line))) + (line + (column_heading + (optionlink + (word)) + (word) + (optionlink + (word))))) + (block + (line + (word)))) + +================================================================================ +NOT h3 uppercase heading +================================================================================ +^V 0x16 22 (SYN) +^W 0x17 23 END + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word) + (word)) + (line + (word) + (word) + (word) + (word)))) + +================================================================================ +NOT column_heading +================================================================================ +tilde ~/foo/bar foo~ bar + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word) + (word) + (word)))) diff --git a/corpus/headline.txt b/corpus/headline.txt deleted file mode 100644 index 1951bef..0000000 --- a/corpus/headline.txt +++ /dev/null @@ -1,38 +0,0 @@ -================================================================================ -Simple headline -================================================================================ - -============================================================================== -Headline *headline* - -Text - --------------------------------------------------------------------------------- - -(help_file - (headline - (word) - (tag - (word))) - (line - (word))) - -================================================================================ -Headline with tag at the start -================================================================================ - -============================================================================== -*03.1* Word movement - -Text - --------------------------------------------------------------------------------- - -(help_file - (headline - (tag - (word)) - (word) - (word)) - (line - (word))) diff --git a/corpus/hotlink.txt b/corpus/hotlink.txt deleted file mode 100644 index 26b13d3..0000000 --- a/corpus/hotlink.txt +++ /dev/null @@ -1,27 +0,0 @@ -================================================================================ -Hotlink alone -================================================================================ - -|world| - --------------------------------------------------------------------------------- - -(help_file - (line - (hotlink - (word)))) - -================================================================================ -Hotlink in text -================================================================================ - -Hello |world| hello - --------------------------------------------------------------------------------- - -(help_file - (line - (word) - (hotlink - (word)) - (word))) diff --git a/corpus/line_block.txt b/corpus/line_block.txt new file mode 100644 index 0000000..76fd6fa --- /dev/null +++ b/corpus/line_block.txt @@ -0,0 +1,116 @@ +================================================================================ +line: basic +================================================================================ + + a foo bar + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word)))) + +================================================================================ +blocks: no blank line (EOL) at end of document +================================================================================ +block1 text text +text text + +block2 text + +block3 text text +text text +text text text text +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word)) + (line + (word) + (word))) + (block + (line + (word) + (word))) + (block + (line + (word) + (word) + (word)) + (line + (word) + (word)) + (line + (word) + (word) + (word) + (word)))) + +================================================================================ +blocks: with blank line at end of document +================================================================================ +block1 text text + +block2 text text + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word))) + (block + (line + (word) + (word) + (word)))) + +================================================================================ +list block, listitems +================================================================================ +* list1.a item1 + * list1.b item1 + * list1.b item2 + item2 line2 +* list1.a item2 ~/foo/bar.txt + +* list2 item 1 +* list2 item 1 +-------------------------------------------------------------------------------- + +(help_file + (block + (line_li + (word) + (word)) + (line_li + (word) + (word)) + (line_li + (word) + (word)) + (line + (word) + (word)) + (line_li + (word) + (word) + (word))) + (block + (line_li + (word) + (word) + (word)) + (line_li + (word) + (word) + (word)))) diff --git a/corpus/option.txt b/corpus/option.txt deleted file mode 100644 index af97ed5..0000000 --- a/corpus/option.txt +++ /dev/null @@ -1,43 +0,0 @@ -================================================================================ -Option alone -================================================================================ - -'hello' - --------------------------------------------------------------------------------- - -(help_file - (line - (option - (word)))) - -================================================================================ -Option in text -================================================================================ - -world 'hello' world - --------------------------------------------------------------------------------- - -(help_file - (line - (word) - (option - (word)) - (word))) - -================================================================================ -Near-option -================================================================================ - -Let's see if that works. - --------------------------------------------------------------------------------- - -(help_file - (line - (word) - (word) - (word) - (word) - (word))) diff --git a/corpus/optionlink.txt b/corpus/optionlink.txt new file mode 100644 index 0000000..cb476c3 --- /dev/null +++ b/corpus/optionlink.txt @@ -0,0 +1,87 @@ +================================================================================ +optionlink alone +================================================================================ + +'hello' + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (optionlink + (word))))) + +================================================================================ +optionlink in text +================================================================================ + +world 'hello' world + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (optionlink + (word)) + (word)))) + +================================================================================ +NOT an optionlink #7 #14 +================================================================================ + +Let's see if that works. +no! ','sqlKeyword' +single-char '-' 'g' '보' +non-ascii: '\"' '%)' '-bang' '.*\\.log' '.gitignore' '@{${\"foo\"}}' +number: '04' 'ISO-10646-1' 'python3' + + Option ' :help 'textwidth' + Regular / :help /[ + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word) + (word) + (word)) + (line + (word) + (word) + (word)) + (line + (word) + (word) + (word) + (word)) + (line + (word) + (word) + (word) + (word) + (word) + (word) + (word)) + (line + (word) + (word) + (word) + (word))) + (block + (line + (word) + (word) + (word) + (optionlink + (word))) + (line + (word) + (word) + (word) + (word)))) diff --git a/corpus/taglink.txt b/corpus/taglink.txt new file mode 100644 index 0000000..2e73dd5 --- /dev/null +++ b/corpus/taglink.txt @@ -0,0 +1,84 @@ +================================================================================ +taglink alone +================================================================================ +|world| + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (taglink + (word))))) + +================================================================================ +taglink in text +================================================================================ +Hello |world| hello + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (taglink + (word)) + (word)))) + +================================================================================ +NOT a taglink +================================================================================ + +whitespace |world foo bar| +adjacent || ||| +table-borders |=========| |---------| + +- {event} (String|Array) event + +Note: ":autocmd" can... +'|' works: + :augroup mine | au! BufRead | augroup END + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (taglink + (word) + (MISSING "|")) + (word) + (word)) + (line + (word) + (word) + (word)) + (line + (word) + (word) + (word))) + (block + (line_li + (argument + (word)) + (word) + (word))) + (block + (line + (word) + (word) + (word)) + (line + (word) + (word)) + (line + (word) + (word) + (word) + (word) + (word) + (word) + (word) + (word)))) diff --git a/corpus/tags.txt b/corpus/tags.txt index 7b37604..fcd3399 100644 --- a/corpus/tags.txt +++ b/corpus/tags.txt @@ -1,62 +1,120 @@ ================================================================================ -Simple tag +tag: basic ================================================================================ *foobar* -------------------------------------------------------------------------------- (help_file - (line - (tag - (word)))) + (block + (line + (tag + (word))))) ================================================================================ -Tag in text +tag in text ================================================================================ *tag* in text -------------------------------------------------------------------------------- (help_file - (line - (tag - (word)) - (word) - (word))) + (block + (line + (tag + (word)) + (word) + (word)))) ================================================================================ -Tag with lines after +tag with lines after ================================================================================ *foo* Hello -------------------------------------------------------------------------------- (help_file - (line - (tag - (word))) - (line - (word))) + (block + (line + (tag + (word))) + (line + (word)))) ================================================================================ -Tag on the right +tag on the right ================================================================================ *inclusion* -------------------------------------------------------------------------------- (help_file - (line - (tag - (word)))) + (block + (line + (tag + (word))))) ================================================================================ -Option in tag +optionlink in tag ================================================================================ - *'option'* - -------------------------------------------------------------------------------- (help_file - (line - (tag - (option + (block + (line + (tag (word))))) + +================================================================================ +NOT a tag +================================================================================ +* bullet1 + * bullet2 bullet2 + * bullet3 + bullet3 bullet3 +* bullet4 + +1 "*" not +2 * not +3this *not no + +4this *is not* a tag + +-------------------------------------------------------------------------------- + +(help_file + (block + (line_li + (word)) + (line_li + (word) + (word)) + (line_li + (word)) + (line + (word) + (word)) + (line_li + (word))) + (block + (line + (word) + (word) + (word)) + (line + (word) + (ERROR) + (word)) + (line + (word) + (tag + (word) + (MISSING "*")) + (word))) + (block + (line + (word) + (tag + (word) + (MISSING "*")) + (word) + (word) + (word)))) diff --git a/corpus/header.txt b/corpus/text.txt similarity index 76% rename from corpus/header.txt rename to corpus/text.txt index fd24fd1..416b36d 100644 --- a/corpus/header.txt +++ b/corpus/text.txt @@ -1,29 +1,31 @@ ================================================================================ -Simple file with text +simple file with text ================================================================================ Simple text -------------------------------------------------------------------------------- (help_file - (line - (word) - (word))) + (block + (line + (word) + (word)))) ================================================================================ -Multiline text +multiline text ================================================================================ Multiline text -------------------------------------------------------------------------------- (help_file - (line - (word)) - (line - (word))) + (block + (line + (word)) + (line + (word)))) ================================================================================ -Empty line +empty line ================================================================================ An Empty @@ -32,9 +34,11 @@ line -------------------------------------------------------------------------------- (help_file - (line - (word)) - (line - (word)) - (line - (word))) + (block + (line + (word)) + (line + (word))) + (block + (line + (word)))) diff --git a/corpus/url.txt b/corpus/url.txt new file mode 100644 index 0000000..88fb0a6 --- /dev/null +++ b/corpus/url.txt @@ -0,0 +1,53 @@ +================================================================================ +url +================================================================================ +url in text https://neovim.io/doc/user/#yay more here bro +text text + https://neovim.io/doc/user/#yay +x (https://neovim.io/doc/user/#yay) https://neovim.io/doc/user/#yay +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word) + (word) + (word) + (url + (word)) + (word) + (word) + (word)) + (line + (word) + (word)) + (line + (url + (word))) + (line + (word) + (word) + (url + (word))))) + +================================================================================ +url with parens (FIXME) +================================================================================ +text + +url: (https://neovim.io/doc/user/(foo)#yay) +markdown: [https://neovim.io/doc/user/#yay](https://neovim.io/doc/user/#yay). + +-------------------------------------------------------------------------------- + +(help_file + (block + (line + (word))) + (block + (line + (word) + (word)) + (line + (word) + (word)))) diff --git a/grammar.js b/grammar.js index ce09fae..d40903e 100644 --- a/grammar.js +++ b/grammar.js @@ -1,58 +1,176 @@ module.exports = grammar({ name: 'help', // The actual language name is help - extras: ($) => [/[\t ]/], - - externals: ($) => [ - $.word, - $._imm_word, - $.column_name, - $.uppercase_name, - $.code_block - ], + extras: () => [/[\t ]/], rules: { help_file: ($) => - repeat1(choice($.line, '\n', $.column_heading, $.headline, $.code_block)), - - headline: ($) => seq( - field('delimiter', choice(/===.*===/, /---.*---/)), - '\n', - repeat1($._atom), - '\n', + repeat(/[\t ]*\n/), // Eat whitespace at top of file. + repeat(choice( + $.block, + $.h1, + $.h2, + $.h3, + )), + // Last block may not be followed by a blank line or EOL. + optional(alias($.block_end, $.block)), ), - line: ($) => prec.right(seq(repeat1($._atom), optional($.code_block), optional('\n'))), - _atom: ($) => choice( $.word, $.tag, - $.tag, - $.option, - $.hotlink, - $.backtick, + $.url, + $.optionlink, + $.taglink, + $.codespan, $.argument, ), + word: () => choice( + // Try the more-restrictive pattern at higher relative precedence, so that things like + // "foo({a})" parse as "(word) (argument)" instead of "(word)". + token(prec(-1, /[^\n\t~{ ]+/)), + token(prec(-2, /[^\n\t ]+/)), + + // Special cases: + // + // "|====|" and "|----|" are (plain text) table borders, not taglinks. + /\|(([+=][+=][+=][+=]+)|([+-][+-][+-][+-]+))\|/, + // NOT optionlink: single "'". + /[\t ]'[\t ]/, + // NOT optionlink: contains any non-lowercase char. + seq("'", token.immediate(/[^'\n\t ]*[^'a-z\n\t ][^'\n\t ]*/), token.immediate("'")), + // NOT optionlink: single char surrounded by "'". + seq("'", token.immediate(/[^'\n\t ]/), token.immediate("'")), + // NOT taglink: single "|". + /[\t ]\|[\t ]/, + // NOT taglink: "||". + /\|\|*/, + // NOT argument: "{}". + /\{\}/, + ), + + // Text block/paragraph: adjacent lines followed by blank line(s). + block: ($) => prec.right(seq( + repeat1(choice($.line, $.line_li)), + repeat1(_blank()), + ) + ), + // Special case: last block in the document may not end with blank line (nor even EOL). + block_end: ($) => prec.right(choice( + choice( + alias($.line_noeol, $.line), + alias($.line_li_noeol, $.line_li)), + seq(repeat1(choice($.line, $.line_li)), + choice( + alias($.line_noeol, $.line), + alias($.line_li_noeol, $.line_li)))) + ), + + // Code block: preformatted lines delimited by ">" and "<". + codeblock: ($) => prec.right(seq( + />[\t ]*\n/, + repeat1(alias($.line_code, $.line)), + // Code block ends if a line starts with "<" or a non-empty line starts with a visible char. + token.immediate(choice(/<[\t ]*\n/, /[^\t\n ]/)), + )), + + // Lines. + line: ($) => _line($, true), + line_noeol: ($) => _line($, false), + // Listitem line. + line_li: ($) => seq(/[-*+•][ ]+/, repeat1($._atom), '\n'), + line_li_noeol: ($) => seq(/[-*+•][ ]+/, repeat1($._atom)), + // Codeblock lines: must be indented by at least 1 space/tab. + // Line content (incl. whitespace) is captured as a single atom. + line_code: () => choice('\n', seq(/[\t ]+[^\n]+/, /\n/)), + + // "Column heading": plaintext followed by "~". + // Intended for table column names per `:help help-writing`. column_heading: ($) => seq( - choice( - seq(field('name', $.uppercase_name), optional($.tag)), - field('name', $.column_name), - ), + field('name', choice($.uppercase_name, repeat1($._atom))), // TODO: should be $.word (plaintext). + /~[\t ]*\n/, + ), + + h1: ($) => + seq( + field('delimiter', /[\t ]*============+[\t ]*\n/), + repeat1($._atom), '\n', + repeat(_blank()), ), - tag: ($) => seq('*', field('name', $._atom), token.immediate('*')), - option: ($) => wrapped_word($, "'", 'name'), - hotlink: ($) => wrapped_word($, '|', 'destination'), - backtick: ($) => wrapped_word($, '`', 'content'), - argument: ($) => seq("{", field('name', $.word), token.immediate('}')) + h2: ($) => + seq( + field('delimiter', /[\t ]*------------+[\t ]*\n/), + repeat1($._atom), + '\n', + repeat(_blank()), + ), + + // Heading 3: UPPERCASE WORDS, followed by optional *tags*. + uppercase_name: () => seq( + token.immediate(/[A-Z0-9.()][-A-Z0-9.()_]+/), // No whitespace before heading. + repeat(/[A-Z0-9.()][-A-Z0-9.()_]+/)), + h3: ($) => + seq( + field('name', $.uppercase_name), + repeat($.tag), + '\n', + repeat(_blank()), + ), + + tag: ($) => _word($, + /[^*\n\t ]+/, // Tag text without surrounding "*". + '*', '*'), + + // URL without surrounding (), [], etc. + url_word: () => /https?:[^\n\t)\] ]+/, + url: ($) => choice( + // seq('(', field('text', prec.left(alias($.url_word, $.word))), token.immediate(')')), + // seq('[', field('text', prec.left(alias($.url_word, $.word))), token.immediate(']')), + field('text', alias($.url_word, $.word)) + ), + + // Link to option: 'foo'. Lowercase non-digit ASCII, minimum 2 chars. #14 + optionlink: ($) => _word($, + // Option name without surrounding "'". + /[a-z][a-z]+/, + "'", "'"), + // Link to tag: |foo| + taglink: ($) => _word($, + /[^|\n\t ]+/, + '|', '|'), + // Inline code (may contain whitespace!): `foo bar` + codespan: ($) => _word($, + /[^``\n]+/, + '`', '`'), + // Argument: {arg} + argument: ($) => _word($, + /[^{}\n\t ]+/, + '{', '}'), }, }); -function wrapped_word($, char, fname) { - return seq(char, field(fname, alias($._imm_word, $.word)), token.immediate(char)); +// Word delimited by special chars. +// The word_regex capture is aliased to "word" because they are semantically +// the same: atoms of captured plain text. +function _word($, word_regex, c1, c2, fname) { + fname = fname ?? 'text'; + return seq(c1, field(fname, alias(token.immediate(word_regex), $.word)), token.immediate(c2)); +} + +function _line($, require_eol) { + const eol = require_eol ? '\n' : optional('\n'); + return choice( + $.column_heading, + seq(repeat($._atom), $.codeblock), + seq(repeat1($._atom), choice($.codeblock, eol))); +} + +function _blank() { + return field('blank', /[\t ]*\n/); } diff --git a/queries/help/highlights.scm b/queries/help/highlights.scm new file mode 100644 index 0000000..6be4e49 --- /dev/null +++ b/queries/help/highlights.scm @@ -0,0 +1,16 @@ +(h1) @text.title +(h2) @text.title +(h3) @text.title +(column_heading) @text.title +(tag + "*" @conceal (#set! conceal "") + text: (_) @label) +(taglink + "|" @conceal (#set! conceal "") + text: (_) @text.reference) +(optionlink + text: (_) @text.literal) +(codespan + "`" @conceal (#set! conceal "") + text: (_) @string) +(argument) @parameter diff --git a/src/grammar.json b/src/grammar.json index 725a392..7995bed 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -2,71 +2,185 @@ "name": "help", "rules": { "help_file": { - "type": "REPEAT1", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "line" - }, - { - "type": "STRING", - "value": "\n" - }, - { - "type": "SYMBOL", - "name": "column_heading" - }, - { - "type": "SYMBOL", - "name": "headline" - }, - { - "type": "SYMBOL", - "name": "code_block" - } - ] - } - }, - "headline": { "type": "SEQ", "members": [ { - "type": "FIELD", - "name": "delimiter", + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[\\t ]*\\n" + } + }, + { + "type": "REPEAT", "content": { "type": "CHOICE", "members": [ { - "type": "PATTERN", - "value": "===.*===" + "type": "SYMBOL", + "name": "block" }, { - "type": "PATTERN", - "value": "---.*---" + "type": "SYMBOL", + "name": "h1" + }, + { + "type": "SYMBOL", + "name": "h2" + }, + { + "type": "SYMBOL", + "name": "h3" } ] } }, { - "type": "STRING", - "value": "\n" + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "block_end" + }, + "named": true, + "value": "block" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_atom": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "word" }, { - "type": "REPEAT1", + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "url" + }, + { + "type": "SYMBOL", + "name": "optionlink" + }, + { + "type": "SYMBOL", + "name": "taglink" + }, + { + "type": "SYMBOL", + "name": "codespan" + }, + { + "type": "SYMBOL", + "name": "argument" + } + ] + }, + "word": { + "type": "CHOICE", + "members": [ + { + "type": "TOKEN", "content": { - "type": "SYMBOL", - "name": "_atom" + "type": "PREC", + "value": -1, + "content": { + "type": "PATTERN", + "value": "[^\\n\\t~{ ]+" + } } }, { - "type": "STRING", - "value": "\n" + "type": "TOKEN", + "content": { + "type": "PREC", + "value": -2, + "content": { + "type": "PATTERN", + "value": "[^\\n\\t ]+" + } + } + }, + { + "type": "PATTERN", + "value": "\\|(([+=][+=][+=][+=]+)|([+-][+-][+-][+-]+))\\|" + }, + { + "type": "PATTERN", + "value": "[\\t ]'[\\t ]" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^'\\n\\t ]*[^'a-z\\n\\t ][^'\\n\\t ]*" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "'" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^'\\n\\t ]" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "'" + } + } + ] + }, + { + "type": "PATTERN", + "value": "[\\t ]\\|[\\t ]" + }, + { + "type": "PATTERN", + "value": "\\|\\|*" + }, + { + "type": "PATTERN", + "value": "\\{\\}" } ] }, - "line": { + "block": { "type": "PREC_RIGHT", "value": 0, "content": { @@ -75,93 +189,246 @@ { "type": "REPEAT1", "content": { - "type": "SYMBOL", - "name": "_atom" + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "line" + }, + { + "type": "SYMBOL", + "name": "line_li" + } + ] } }, + { + "type": "REPEAT1", + "content": { + "type": "FIELD", + "name": "blank", + "content": { + "type": "PATTERN", + "value": "[\\t ]*\\n" + } + } + } + ] + } + }, + "block_end": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "CHOICE", + "members": [ { "type": "CHOICE", "members": [ { - "type": "SYMBOL", - "name": "code_block" + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "line_noeol" + }, + "named": true, + "value": "line" }, { - "type": "BLANK" + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "line_li_noeol" + }, + "named": true, + "value": "line_li" } ] }, { - "type": "CHOICE", + "type": "SEQ", "members": [ { - "type": "STRING", - "value": "\n" + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "line" + }, + { + "type": "SYMBOL", + "name": "line_li" + } + ] + } }, { - "type": "BLANK" + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "line_noeol" + }, + "named": true, + "value": "line" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "line_li_noeol" + }, + "named": true, + "value": "line_li" + } + ] } ] } ] } }, - "_atom": { + "codeblock": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": ">[\\t ]*\\n" + }, + { + "type": "REPEAT1", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "line_code" + }, + "named": true, + "value": "line" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "<[\\t ]*\\n" + }, + { + "type": "PATTERN", + "value": "[^\\t\\n ]" + } + ] + } + } + ] + } + }, + "line": { "type": "CHOICE", "members": [ { "type": "SYMBOL", - "name": "word" + "name": "column_heading" }, { - "type": "SYMBOL", - "name": "tag" - }, - { - "type": "SYMBOL", - "name": "tag" + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + }, + { + "type": "SYMBOL", + "name": "codeblock" + } + ] }, { - "type": "SYMBOL", - "name": "option" - }, + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "codeblock" + }, + { + "type": "STRING", + "value": "\n" + } + ] + } + ] + } + ] + }, + "line_noeol": { + "type": "CHOICE", + "members": [ { "type": "SYMBOL", - "name": "hotlink" + "name": "column_heading" }, { - "type": "SYMBOL", - "name": "backtick" + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + }, + { + "type": "SYMBOL", + "name": "codeblock" + } + ] }, { - "type": "SYMBOL", - "name": "argument" - } - ] - }, - "column_heading": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", + "type": "SEQ", "members": [ { - "type": "SEQ", + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + }, + { + "type": "CHOICE", "members": [ { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "uppercase_name" - } + "type": "SYMBOL", + "name": "codeblock" }, { "type": "CHOICE", "members": [ { - "type": "SYMBOL", - "name": "tag" + "type": "STRING", + "value": "\n" }, { "type": "BLANK" @@ -169,20 +436,219 @@ ] } ] + } + ] + } + ] + }, + "line_li": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[-*+•][ ]+" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + }, + { + "type": "STRING", + "value": "\n" + } + ] + }, + "line_li_noeol": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[-*+•][ ]+" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + } + ] + }, + "line_code": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "\n" + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[\\t ]+[^\\n]+" }, { - "type": "FIELD", - "name": "name", - "content": { + "type": "PATTERN", + "value": "\\n" + } + ] + } + ] + }, + "column_heading": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { "type": "SYMBOL", - "name": "column_name" + "name": "uppercase_name" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_atom" + } } + ] + } + }, + { + "type": "PATTERN", + "value": "~[\\t ]*\\n" + } + ] + }, + "h1": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "delimiter", + "content": { + "type": "PATTERN", + "value": "[\\t ]*============+[\\t ]*\\n" + } + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + }, + { + "type": "STRING", + "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "blank", + "content": { + "type": "PATTERN", + "value": "[\\t ]*\\n" } - ] + } + } + ] + }, + "h2": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "delimiter", + "content": { + "type": "PATTERN", + "value": "[\\t ]*------------+[\\t ]*\\n" + } + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_atom" + } + }, + { + "type": "STRING", + "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "blank", + "content": { + "type": "PATTERN", + "value": "[\\t ]*\\n" + } + } + } + ] + }, + "uppercase_name": { + "type": "SEQ", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[A-Z0-9.()][-A-Z0-9.()_]+" + } + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[A-Z0-9.()][-A-Z0-9.()_]+" + } + } + ] + }, + "h3": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "uppercase_name" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "tag" + } }, { "type": "STRING", "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "blank", + "content": { + "type": "PATTERN", + "value": "[\\t ]*\\n" + } + } } ] }, @@ -195,10 +661,18 @@ }, { "type": "FIELD", - "name": "name", + "name": "text", "content": { - "type": "SYMBOL", - "name": "_atom" + "type": "ALIAS", + "content": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^*\\n\\t ]+" + } + }, + "named": true, + "value": "word" } }, { @@ -210,7 +684,29 @@ } ] }, - "option": { + "url_word": { + "type": "PATTERN", + "value": "https?:[^\\n\\t)\\] ]+" + }, + "url": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "text", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "url_word" + }, + "named": true, + "value": "word" + } + } + ] + }, + "optionlink": { "type": "SEQ", "members": [ { @@ -219,12 +715,15 @@ }, { "type": "FIELD", - "name": "name", + "name": "text", "content": { "type": "ALIAS", "content": { - "type": "SYMBOL", - "name": "_imm_word" + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[a-z][a-z]+" + } }, "named": true, "value": "word" @@ -239,7 +738,7 @@ } ] }, - "hotlink": { + "taglink": { "type": "SEQ", "members": [ { @@ -248,12 +747,15 @@ }, { "type": "FIELD", - "name": "destination", + "name": "text", "content": { "type": "ALIAS", "content": { - "type": "SYMBOL", - "name": "_imm_word" + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^|\\n\\t ]+" + } }, "named": true, "value": "word" @@ -268,7 +770,7 @@ } ] }, - "backtick": { + "codespan": { "type": "SEQ", "members": [ { @@ -277,12 +779,15 @@ }, { "type": "FIELD", - "name": "content", + "name": "text", "content": { "type": "ALIAS", "content": { - "type": "SYMBOL", - "name": "_imm_word" + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^``\\n]+" + } }, "named": true, "value": "word" @@ -306,10 +811,18 @@ }, { "type": "FIELD", - "name": "name", + "name": "text", "content": { - "type": "SYMBOL", - "name": "word" + "type": "ALIAS", + "content": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^{}\\n\\t ]+" + } + }, + "named": true, + "value": "word" } }, { @@ -330,28 +843,7 @@ ], "conflicts": [], "precedences": [], - "externals": [ - { - "type": "SYMBOL", - "name": "word" - }, - { - "type": "SYMBOL", - "name": "_imm_word" - }, - { - "type": "SYMBOL", - "name": "column_name" - }, - { - "type": "SYMBOL", - "name": "uppercase_name" - }, - { - "type": "SYMBOL", - "name": "code_block" - } - ], + "externals": [], "inline": [], "supertypes": [] } diff --git a/src/node-types.json b/src/node-types.json index e9e7829..ee08e22 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -3,7 +3,7 @@ "type": "argument", "named": true, "fields": { - "name": { + "text": { "multiple": false, "required": true, "types": [ @@ -16,10 +16,44 @@ } }, { - "type": "backtick", + "type": "block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "line", + "named": true + }, + { + "type": "line_li", + "named": true + } + ] + } + }, + { + "type": "codeblock", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "line", + "named": true + } + ] + } + }, + { + "type": "codespan", "named": true, "fields": { - "content": { + "text": { "multiple": false, "required": true, "types": [ @@ -36,33 +70,47 @@ "named": true, "fields": { "name": { - "multiple": false, + "multiple": true, "required": true, "types": [ { - "type": "column_name", + "type": "argument", + "named": true + }, + { + "type": "codespan", + "named": true + }, + { + "type": "optionlink", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "taglink", "named": true }, { "type": "uppercase_name", "named": true + }, + { + "type": "url", + "named": true + }, + { + "type": "word", + "named": true } ] } - }, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "tag", - "named": true - } - ] } }, { - "type": "headline", + "type": "h1", "named": true, "fields": {}, "children": { @@ -74,19 +122,23 @@ "named": true }, { - "type": "backtick", + "type": "codespan", "named": true }, { - "type": "hotlink", + "type": "optionlink", "named": true }, { - "type": "option", + "type": "tag", "named": true }, { - "type": "tag", + "type": "taglink", + "named": true + }, + { + "type": "url", "named": true }, { @@ -97,46 +149,95 @@ } }, { - "type": "help_file", + "type": "h2", "named": true, "fields": {}, "children": { "multiple": true, - "required": false, + "required": true, "types": [ { - "type": "code_block", + "type": "argument", "named": true }, { - "type": "column_heading", + "type": "codespan", "named": true }, { - "type": "headline", + "type": "optionlink", "named": true }, { - "type": "line", + "type": "tag", + "named": true + }, + { + "type": "taglink", + "named": true + }, + { + "type": "url", + "named": true + }, + { + "type": "word", "named": true } ] } }, { - "type": "hotlink", + "type": "h3", "named": true, "fields": { - "destination": { + "name": { "multiple": false, "required": true, "types": [ { - "type": "word", + "type": "uppercase_name", "named": true } ] } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "tag", + "named": true + } + ] + } + }, + { + "type": "help_file", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "block", + "named": true + }, + { + "type": "h1", + "named": true + }, + { + "type": "h2", + "named": true + }, + { + "type": "h3", + "named": true + } + ] } }, { @@ -145,32 +246,40 @@ "fields": {}, "children": { "multiple": true, - "required": true, + "required": false, "types": [ { "type": "argument", "named": true }, { - "type": "backtick", + "type": "codeblock", "named": true }, { - "type": "code_block", + "type": "codespan", "named": true }, { - "type": "hotlink", + "type": "column_heading", "named": true }, { - "type": "option", + "type": "optionlink", "named": true }, { "type": "tag", "named": true }, + { + "type": "taglink", + "named": true + }, + { + "type": "url", + "named": true + }, { "type": "word", "named": true @@ -179,10 +288,49 @@ } }, { - "type": "option", + "type": "line_li", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "argument", + "named": true + }, + { + "type": "codespan", + "named": true + }, + { + "type": "optionlink", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "taglink", + "named": true + }, + { + "type": "url", + "named": true + }, + { + "type": "word", + "named": true + } + ] + } + }, + { + "type": "optionlink", "named": true, "fields": { - "name": { + "text": { "multiple": false, "required": true, "types": [ @@ -198,30 +346,47 @@ "type": "tag", "named": true, "fields": { - "name": { + "text": { "multiple": false, "required": true, "types": [ { - "type": "argument", - "named": true - }, - { - "type": "backtick", - "named": true - }, - { - "type": "hotlink", - "named": true - }, - { - "type": "option", + "type": "word", "named": true - }, + } + ] + } + } + }, + { + "type": "taglink", + "named": true, + "fields": { + "text": { + "multiple": false, + "required": true, + "types": [ { - "type": "tag", + "type": "word", "named": true - }, + } + ] + } + } + }, + { + "type": "uppercase_name", + "named": true, + "fields": {} + }, + { + "type": "url", + "named": true, + "fields": { + "text": { + "multiple": false, + "required": true, + "types": [ { "type": "word", "named": true @@ -230,6 +395,11 @@ } } }, + { + "type": "word", + "named": true, + "fields": {} + }, { "type": "\n", "named": false @@ -246,22 +416,6 @@ "type": "`", "named": false }, - { - "type": "code_block", - "named": true - }, - { - "type": "column_name", - "named": true - }, - { - "type": "uppercase_name", - "named": true - }, - { - "type": "word", - "named": true - }, { "type": "{", "named": false diff --git a/src/parser.c b/src/parser.c index cc69f90..ae14d0a 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,115 +6,226 @@ #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 65 -#define LARGE_STATE_COUNT 6 -#define SYMBOL_COUNT 31 +#define STATE_COUNT 97 +#define LARGE_STATE_COUNT 7 +#define SYMBOL_COUNT 68 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 19 -#define EXTERNAL_TOKEN_COUNT 5 +#define TOKEN_COUNT 38 +#define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 4 #define MAX_ALIAS_SEQUENCE_LENGTH 4 #define PRODUCTION_ID_COUNT 6 enum { - anon_sym_LF = 1, - aux_sym_headline_token1 = 2, - aux_sym_headline_token2 = 3, - anon_sym_STAR = 4, - anon_sym_STAR2 = 5, + aux_sym_help_file_token1 = 1, + aux_sym_word_token1 = 2, + aux_sym_word_token2 = 3, + aux_sym_word_token3 = 4, + aux_sym_word_token4 = 5, anon_sym_SQUOTE = 6, - anon_sym_SQUOTE2 = 7, - anon_sym_PIPE = 8, - anon_sym_PIPE2 = 9, - anon_sym_BQUOTE = 10, - anon_sym_BQUOTE2 = 11, - anon_sym_LBRACE = 12, - anon_sym_RBRACE = 13, - sym_word = 14, - sym__imm_word = 15, - sym_column_name = 16, - sym_uppercase_name = 17, - sym_code_block = 18, - sym_help_file = 19, - sym_headline = 20, - sym_line = 21, - sym__atom = 22, - sym_column_heading = 23, - sym_tag = 24, - sym_option = 25, - sym_hotlink = 26, - sym_backtick = 27, - sym_argument = 28, - aux_sym_help_file_repeat1 = 29, - aux_sym_headline_repeat1 = 30, + aux_sym_word_token5 = 7, + anon_sym_SQUOTE2 = 8, + aux_sym_word_token6 = 9, + aux_sym_word_token7 = 10, + aux_sym_word_token8 = 11, + aux_sym_word_token9 = 12, + aux_sym_codeblock_token1 = 13, + aux_sym_codeblock_token2 = 14, + anon_sym_LF = 15, + aux_sym_line_li_token1 = 16, + aux_sym_line_code_token1 = 17, + aux_sym_line_code_token2 = 18, + aux_sym_column_heading_token1 = 19, + aux_sym_h1_token1 = 20, + aux_sym_h2_token1 = 21, + aux_sym_uppercase_name_token1 = 22, + aux_sym_uppercase_name_token2 = 23, + anon_sym_STAR = 24, + aux_sym_tag_token1 = 25, + anon_sym_STAR2 = 26, + sym_url_word = 27, + aux_sym_optionlink_token1 = 28, + anon_sym_PIPE = 29, + aux_sym_taglink_token1 = 30, + anon_sym_PIPE2 = 31, + anon_sym_BQUOTE = 32, + aux_sym_codespan_token1 = 33, + anon_sym_BQUOTE2 = 34, + anon_sym_LBRACE = 35, + aux_sym_argument_token1 = 36, + anon_sym_RBRACE = 37, + sym_help_file = 38, + sym__atom = 39, + sym_word = 40, + sym_block = 41, + sym_block_end = 42, + sym_codeblock = 43, + sym_line = 44, + sym_line_noeol = 45, + sym_line_li = 46, + sym_line_li_noeol = 47, + sym_line_code = 48, + sym_column_heading = 49, + sym_h1 = 50, + sym_h2 = 51, + sym_uppercase_name = 52, + sym_h3 = 53, + sym_tag = 54, + sym_url = 55, + sym_optionlink = 56, + sym_taglink = 57, + sym_codespan = 58, + sym_argument = 59, + aux_sym_help_file_repeat1 = 60, + aux_sym_help_file_repeat2 = 61, + aux_sym_block_repeat1 = 62, + aux_sym_block_repeat2 = 63, + aux_sym_codeblock_repeat1 = 64, + aux_sym_line_repeat1 = 65, + aux_sym_uppercase_name_repeat1 = 66, + aux_sym_h3_repeat1 = 67, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", + [aux_sym_help_file_token1] = "help_file_token1", + [aux_sym_word_token1] = "word_token1", + [aux_sym_word_token2] = "word_token2", + [aux_sym_word_token3] = "word_token3", + [aux_sym_word_token4] = "word_token4", + [anon_sym_SQUOTE] = "'", + [aux_sym_word_token5] = "word_token5", + [anon_sym_SQUOTE2] = "'", + [aux_sym_word_token6] = "word_token6", + [aux_sym_word_token7] = "word_token7", + [aux_sym_word_token8] = "word_token8", + [aux_sym_word_token9] = "word_token9", + [aux_sym_codeblock_token1] = "codeblock_token1", + [aux_sym_codeblock_token2] = "codeblock_token2", [anon_sym_LF] = "\n", - [aux_sym_headline_token1] = "headline_token1", - [aux_sym_headline_token2] = "headline_token2", + [aux_sym_line_li_token1] = "line_li_token1", + [aux_sym_line_code_token1] = "line_code_token1", + [aux_sym_line_code_token2] = "line_code_token2", + [aux_sym_column_heading_token1] = "column_heading_token1", + [aux_sym_h1_token1] = "h1_token1", + [aux_sym_h2_token1] = "h2_token1", + [aux_sym_uppercase_name_token1] = "uppercase_name_token1", + [aux_sym_uppercase_name_token2] = "uppercase_name_token2", [anon_sym_STAR] = "*", + [aux_sym_tag_token1] = "word", [anon_sym_STAR2] = "*", - [anon_sym_SQUOTE] = "'", - [anon_sym_SQUOTE2] = "'", + [sym_url_word] = "word", + [aux_sym_optionlink_token1] = "word", [anon_sym_PIPE] = "|", + [aux_sym_taglink_token1] = "word", [anon_sym_PIPE2] = "|", [anon_sym_BQUOTE] = "`", + [aux_sym_codespan_token1] = "word", [anon_sym_BQUOTE2] = "`", [anon_sym_LBRACE] = "{", + [aux_sym_argument_token1] = "word", [anon_sym_RBRACE] = "}", - [sym_word] = "word", - [sym__imm_word] = "word", - [sym_column_name] = "column_name", - [sym_uppercase_name] = "uppercase_name", - [sym_code_block] = "code_block", [sym_help_file] = "help_file", - [sym_headline] = "headline", - [sym_line] = "line", [sym__atom] = "_atom", + [sym_word] = "word", + [sym_block] = "block", + [sym_block_end] = "block", + [sym_codeblock] = "codeblock", + [sym_line] = "line", + [sym_line_noeol] = "line", + [sym_line_li] = "line_li", + [sym_line_li_noeol] = "line_li", + [sym_line_code] = "line", [sym_column_heading] = "column_heading", + [sym_h1] = "h1", + [sym_h2] = "h2", + [sym_uppercase_name] = "uppercase_name", + [sym_h3] = "h3", [sym_tag] = "tag", - [sym_option] = "option", - [sym_hotlink] = "hotlink", - [sym_backtick] = "backtick", + [sym_url] = "url", + [sym_optionlink] = "optionlink", + [sym_taglink] = "taglink", + [sym_codespan] = "codespan", [sym_argument] = "argument", [aux_sym_help_file_repeat1] = "help_file_repeat1", - [aux_sym_headline_repeat1] = "headline_repeat1", + [aux_sym_help_file_repeat2] = "help_file_repeat2", + [aux_sym_block_repeat1] = "block_repeat1", + [aux_sym_block_repeat2] = "block_repeat2", + [aux_sym_codeblock_repeat1] = "codeblock_repeat1", + [aux_sym_line_repeat1] = "line_repeat1", + [aux_sym_uppercase_name_repeat1] = "uppercase_name_repeat1", + [aux_sym_h3_repeat1] = "h3_repeat1", }; static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, + [aux_sym_help_file_token1] = aux_sym_help_file_token1, + [aux_sym_word_token1] = aux_sym_word_token1, + [aux_sym_word_token2] = aux_sym_word_token2, + [aux_sym_word_token3] = aux_sym_word_token3, + [aux_sym_word_token4] = aux_sym_word_token4, + [anon_sym_SQUOTE] = anon_sym_SQUOTE, + [aux_sym_word_token5] = aux_sym_word_token5, + [anon_sym_SQUOTE2] = anon_sym_SQUOTE, + [aux_sym_word_token6] = aux_sym_word_token6, + [aux_sym_word_token7] = aux_sym_word_token7, + [aux_sym_word_token8] = aux_sym_word_token8, + [aux_sym_word_token9] = aux_sym_word_token9, + [aux_sym_codeblock_token1] = aux_sym_codeblock_token1, + [aux_sym_codeblock_token2] = aux_sym_codeblock_token2, [anon_sym_LF] = anon_sym_LF, - [aux_sym_headline_token1] = aux_sym_headline_token1, - [aux_sym_headline_token2] = aux_sym_headline_token2, + [aux_sym_line_li_token1] = aux_sym_line_li_token1, + [aux_sym_line_code_token1] = aux_sym_line_code_token1, + [aux_sym_line_code_token2] = aux_sym_line_code_token2, + [aux_sym_column_heading_token1] = aux_sym_column_heading_token1, + [aux_sym_h1_token1] = aux_sym_h1_token1, + [aux_sym_h2_token1] = aux_sym_h2_token1, + [aux_sym_uppercase_name_token1] = aux_sym_uppercase_name_token1, + [aux_sym_uppercase_name_token2] = aux_sym_uppercase_name_token2, [anon_sym_STAR] = anon_sym_STAR, + [aux_sym_tag_token1] = sym_word, [anon_sym_STAR2] = anon_sym_STAR, - [anon_sym_SQUOTE] = anon_sym_SQUOTE, - [anon_sym_SQUOTE2] = anon_sym_SQUOTE, + [sym_url_word] = sym_word, + [aux_sym_optionlink_token1] = sym_word, [anon_sym_PIPE] = anon_sym_PIPE, + [aux_sym_taglink_token1] = sym_word, [anon_sym_PIPE2] = anon_sym_PIPE, [anon_sym_BQUOTE] = anon_sym_BQUOTE, + [aux_sym_codespan_token1] = sym_word, [anon_sym_BQUOTE2] = anon_sym_BQUOTE, [anon_sym_LBRACE] = anon_sym_LBRACE, + [aux_sym_argument_token1] = sym_word, [anon_sym_RBRACE] = anon_sym_RBRACE, - [sym_word] = sym_word, - [sym__imm_word] = sym_word, - [sym_column_name] = sym_column_name, - [sym_uppercase_name] = sym_uppercase_name, - [sym_code_block] = sym_code_block, [sym_help_file] = sym_help_file, - [sym_headline] = sym_headline, - [sym_line] = sym_line, [sym__atom] = sym__atom, + [sym_word] = sym_word, + [sym_block] = sym_block, + [sym_block_end] = sym_block, + [sym_codeblock] = sym_codeblock, + [sym_line] = sym_line, + [sym_line_noeol] = sym_line, + [sym_line_li] = sym_line_li, + [sym_line_li_noeol] = sym_line_li, + [sym_line_code] = sym_line, [sym_column_heading] = sym_column_heading, + [sym_h1] = sym_h1, + [sym_h2] = sym_h2, + [sym_uppercase_name] = sym_uppercase_name, + [sym_h3] = sym_h3, [sym_tag] = sym_tag, - [sym_option] = sym_option, - [sym_hotlink] = sym_hotlink, - [sym_backtick] = sym_backtick, + [sym_url] = sym_url, + [sym_optionlink] = sym_optionlink, + [sym_taglink] = sym_taglink, + [sym_codespan] = sym_codespan, [sym_argument] = sym_argument, [aux_sym_help_file_repeat1] = aux_sym_help_file_repeat1, - [aux_sym_headline_repeat1] = aux_sym_headline_repeat1, + [aux_sym_help_file_repeat2] = aux_sym_help_file_repeat2, + [aux_sym_block_repeat1] = aux_sym_block_repeat1, + [aux_sym_block_repeat2] = aux_sym_block_repeat2, + [aux_sym_codeblock_repeat1] = aux_sym_codeblock_repeat1, + [aux_sym_line_repeat1] = aux_sym_line_repeat1, + [aux_sym_uppercase_name_repeat1] = aux_sym_uppercase_name_repeat1, + [aux_sym_h3_repeat1] = aux_sym_h3_repeat1, }; static const TSSymbolMetadata ts_symbol_metadata[] = { @@ -122,15 +233,95 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, + [aux_sym_help_file_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_word_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_word_token2] = { + .visible = false, + .named = false, + }, + [aux_sym_word_token3] = { + .visible = false, + .named = false, + }, + [aux_sym_word_token4] = { + .visible = false, + .named = false, + }, + [anon_sym_SQUOTE] = { + .visible = true, + .named = false, + }, + [aux_sym_word_token5] = { + .visible = false, + .named = false, + }, + [anon_sym_SQUOTE2] = { + .visible = true, + .named = false, + }, + [aux_sym_word_token6] = { + .visible = false, + .named = false, + }, + [aux_sym_word_token7] = { + .visible = false, + .named = false, + }, + [aux_sym_word_token8] = { + .visible = false, + .named = false, + }, + [aux_sym_word_token9] = { + .visible = false, + .named = false, + }, + [aux_sym_codeblock_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_codeblock_token2] = { + .visible = false, + .named = false, + }, [anon_sym_LF] = { .visible = true, .named = false, }, - [aux_sym_headline_token1] = { + [aux_sym_line_li_token1] = { .visible = false, .named = false, }, - [aux_sym_headline_token2] = { + [aux_sym_line_code_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_line_code_token2] = { + .visible = false, + .named = false, + }, + [aux_sym_column_heading_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_h1_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_h2_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_uppercase_name_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_uppercase_name_token2] = { .visible = false, .named = false, }, @@ -138,22 +329,30 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [aux_sym_tag_token1] = { + .visible = true, + .named = true, + }, [anon_sym_STAR2] = { .visible = true, .named = false, }, - [anon_sym_SQUOTE] = { + [sym_url_word] = { .visible = true, - .named = false, + .named = true, }, - [anon_sym_SQUOTE2] = { + [aux_sym_optionlink_token1] = { .visible = true, - .named = false, + .named = true, }, [anon_sym_PIPE] = { .visible = true, .named = false, }, + [aux_sym_taglink_token1] = { + .visible = true, + .named = true, + }, [anon_sym_PIPE2] = { .visible = true, .named = false, @@ -162,6 +361,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [aux_sym_codespan_token1] = { + .visible = true, + .named = true, + }, [anon_sym_BQUOTE2] = { .visible = true, .named = false, @@ -170,63 +373,95 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [aux_sym_argument_token1] = { + .visible = true, + .named = true, + }, [anon_sym_RBRACE] = { .visible = true, .named = false, }, + [sym_help_file] = { + .visible = true, + .named = true, + }, + [sym__atom] = { + .visible = false, + .named = true, + }, [sym_word] = { .visible = true, .named = true, }, - [sym__imm_word] = { + [sym_block] = { .visible = true, .named = true, }, - [sym_column_name] = { + [sym_block_end] = { .visible = true, .named = true, }, - [sym_uppercase_name] = { + [sym_codeblock] = { .visible = true, .named = true, }, - [sym_code_block] = { + [sym_line] = { .visible = true, .named = true, }, - [sym_help_file] = { + [sym_line_noeol] = { .visible = true, .named = true, }, - [sym_headline] = { + [sym_line_li] = { .visible = true, .named = true, }, - [sym_line] = { + [sym_line_li_noeol] = { .visible = true, .named = true, }, - [sym__atom] = { - .visible = false, + [sym_line_code] = { + .visible = true, .named = true, }, [sym_column_heading] = { .visible = true, .named = true, }, + [sym_h1] = { + .visible = true, + .named = true, + }, + [sym_h2] = { + .visible = true, + .named = true, + }, + [sym_uppercase_name] = { + .visible = true, + .named = true, + }, + [sym_h3] = { + .visible = true, + .named = true, + }, [sym_tag] = { .visible = true, .named = true, }, - [sym_option] = { + [sym_url] = { .visible = true, .named = true, }, - [sym_hotlink] = { + [sym_optionlink] = { .visible = true, .named = true, }, - [sym_backtick] = { + [sym_taglink] = { + .visible = true, + .named = true, + }, + [sym_codespan] = { .visible = true, .named = true, }, @@ -238,25 +473,49 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, - [aux_sym_headline_repeat1] = { + [aux_sym_help_file_repeat2] = { + .visible = false, + .named = false, + }, + [aux_sym_block_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_block_repeat2] = { + .visible = false, + .named = false, + }, + [aux_sym_codeblock_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_line_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_uppercase_name_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_h3_repeat1] = { .visible = false, .named = false, }, }; enum { - field_content = 1, + field_blank = 1, field_delimiter = 2, - field_destination = 3, - field_name = 4, + field_name = 3, + field_text = 4, }; static const char * const ts_field_names[] = { [0] = NULL, - [field_content] = "content", + [field_blank] = "blank", [field_delimiter] = "delimiter", - [field_destination] = "destination", [field_name] = "name", + [field_text] = "text", }; static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { @@ -269,13 +528,13 @@ static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { static const TSFieldMapEntry ts_field_map_entries[] = { [0] = - {field_name, 0}, + {field_text, 0}, [1] = - {field_name, 1}, + {field_name, 0}, [2] = - {field_destination, 1}, + {field_blank, 0}, [3] = - {field_content, 1}, + {field_text, 1}, [4] = {field_delimiter, 0}, }; @@ -295,13 +554,13 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [3] = 3, [4] = 4, [5] = 5, - [6] = 4, + [6] = 6, [7] = 7, [8] = 8, [9] = 9, [10] = 10, [11] = 11, - [12] = 12, + [12] = 11, [13] = 13, [14] = 14, [15] = 15, @@ -310,50 +569,82 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [18] = 18, [19] = 19, [20] = 20, - [21] = 20, - [22] = 20, - [23] = 9, - [24] = 10, - [25] = 13, - [26] = 18, - [27] = 17, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 26, + [27] = 27, [28] = 28, - [29] = 10, + [29] = 29, [30] = 30, [31] = 31, [32] = 32, [33] = 33, - [34] = 31, + [34] = 34, [35] = 35, - [36] = 13, - [37] = 18, - [38] = 9, - [39] = 17, + [36] = 36, + [37] = 37, + [38] = 38, + [39] = 39, [40] = 40, [41] = 41, [42] = 42, [43] = 43, [44] = 44, - [45] = 30, - [46] = 35, + [45] = 45, + [46] = 46, [47] = 47, - [48] = 33, - [49] = 32, - [50] = 30, - [51] = 35, - [52] = 31, - [53] = 33, - [54] = 32, - [55] = 55, - [56] = 55, - [57] = 44, - [58] = 43, - [59] = 42, + [48] = 44, + [49] = 46, + [50] = 38, + [51] = 45, + [52] = 37, + [53] = 42, + [54] = 41, + [55] = 40, + [56] = 56, + [57] = 57, + [58] = 58, + [59] = 59, [60] = 60, - [61] = 55, - [62] = 44, - [63] = 43, - [64] = 42, + [61] = 61, + [62] = 62, + [63] = 63, + [64] = 64, + [65] = 65, + [66] = 66, + [67] = 66, + [68] = 68, + [69] = 69, + [70] = 70, + [71] = 71, + [72] = 72, + [73] = 73, + [74] = 74, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 80, + [81] = 81, + [82] = 82, + [83] = 83, + [84] = 84, + [85] = 85, + [86] = 74, + [87] = 72, + [88] = 77, + [89] = 73, + [90] = 85, + [91] = 84, + [92] = 92, + [93] = 71, + [94] = 92, + [95] = 78, + [96] = 79, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -361,1024 +652,3161 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(14); - if (lookahead == '\n') ADVANCE(15); - if (lookahead == '\'') ADVANCE(21); - if (lookahead == '*') ADVANCE(19); - if (lookahead == '-') ADVANCE(5); - if (lookahead == '=') ADVANCE(10); - if (lookahead == '`') ADVANCE(25); - if (lookahead == '{') ADVANCE(26); - if (lookahead == '|') ADVANCE(23); - if (lookahead == '}') ADVANCE(27); + if (eof) ADVANCE(26); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\'') ADVANCE(81); + if (lookahead == '*') ADVANCE(104); + if (lookahead == '<') ADVANCE(83); + if (lookahead == '`') ADVANCE(115); + if (lookahead == '{') ADVANCE(116); + if (lookahead == '|') ADVANCE(112); + if (lookahead == '}') ADVANCE(119); + if (lookahead == '~') ADVANCE(82); if (lookahead == '\t' || - lookahead == ' ') SKIP(13) + lookahead == ' ') ADVANCE(4); + if (lookahead != 0) ADVANCE(82); END_STATE(); case 1: - if (lookahead == '\n') ADVANCE(15); - if (lookahead == '\'') ADVANCE(21); - if (lookahead == '*') ADVANCE(19); - if (lookahead == '`') ADVANCE(25); - if (lookahead == '|') ADVANCE(23); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\'') ADVANCE(81); + if (lookahead == '*') ADVANCE(101); + if (lookahead == '`') ADVANCE(115); + if (lookahead == '|') ADVANCE(112); + if (lookahead == '}') ADVANCE(119); + if (lookahead == '~') ADVANCE(14); if (lookahead == '\t' || - lookahead == ' ') SKIP(2) + lookahead == ' ') SKIP(5) + if (lookahead == '(' || + lookahead == ')' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z')) ADVANCE(18); END_STATE(); case 2: - if (lookahead == '\n') ADVANCE(15); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\'') ADVANCE(79); + if (lookahead == '*') ADVANCE(101); + if (lookahead == '>') ADVANCE(28); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(109); + if (lookahead == '~') ADVANCE(74); if (lookahead == '\t' || - lookahead == ' ') SKIP(2) + lookahead == ' ') ADVANCE(2); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 3: - if (lookahead == '-') ADVANCE(7); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\'') ADVANCE(79); + if (lookahead == '*') ADVANCE(101); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(109); + if (lookahead == '~') ADVANCE(75); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(3); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 4: - if (lookahead == '-') ADVANCE(17); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(7); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\'') ADVANCE(79); + if (lookahead == '*') ADVANCE(101); + if (lookahead == '`') ADVANCE(113); + if (lookahead == '{') ADVANCE(116); + if (lookahead == '|') ADVANCE(110); + if (lookahead == '~') ADVANCE(75); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(4); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 5: - if (lookahead == '-') ADVANCE(3); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '*') ADVANCE(101); + if (lookahead == '~') ADVANCE(14); + if (lookahead == '\t' || + lookahead == ' ') SKIP(5) + if (lookahead == '(' || + lookahead == ')' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z')) ADVANCE(18); END_STATE(); case 6: - if (lookahead == '-') ADVANCE(4); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(7); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '<') ADVANCE(90); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(7); + if (lookahead != 0) ADVANCE(89); END_STATE(); case 7: - if (lookahead == '-') ADVANCE(6); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(7); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(93); + if (lookahead != 0) ADVANCE(94); END_STATE(); case 8: - if (lookahead == '=') ADVANCE(12); + if (lookahead == '\n') ADVANCE(89); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(8); END_STATE(); case 9: - if (lookahead == '=') ADVANCE(16); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(12); + if (lookahead == '\n') ADVANCE(27); + if (lookahead == '\'') ADVANCE(79); + if (lookahead == '*') ADVANCE(102); + if (lookahead == '-') ADVANCE(31); + if (lookahead == '=') ADVANCE(59); + if (lookahead == '>') ADVANCE(28); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(109); + if (lookahead == '~') ADVANCE(75); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(9); + if (lookahead == '+' || + lookahead == 8226) ADVANCE(32); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 10: - if (lookahead == '=') ADVANCE(8); + if (lookahead == '\n') ADVANCE(27); + if (lookahead == '\'') ADVANCE(79); + if (lookahead == '*') ADVANCE(102); + if (lookahead == '>') ADVANCE(28); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(109); + if (lookahead == '~') ADVANCE(75); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(10); + if (lookahead == '+' || + lookahead == '-' || + lookahead == 8226) ADVANCE(32); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 11: - if (lookahead == '=') ADVANCE(9); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(12); + if (lookahead == '\n') ADVANCE(88); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(11); END_STATE(); case 12: - if (lookahead == '=') ADVANCE(11); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(12); + if (lookahead == '\n') ADVANCE(98); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(12); END_STATE(); case 13: - if (eof) ADVANCE(14); - if (lookahead == '\n') ADVANCE(15); - if (lookahead == '\'') ADVANCE(20); - if (lookahead == '*') ADVANCE(18); - if (lookahead == '-') ADVANCE(5); - if (lookahead == '=') ADVANCE(10); - if (lookahead == '`') ADVANCE(24); - if (lookahead == '{') ADVANCE(26); - if (lookahead == '|') ADVANCE(22); + if (lookahead == '\n') ADVANCE(97); if (lookahead == '\t' || - lookahead == ' ') SKIP(13) + lookahead == ' ') ADVANCE(13); END_STATE(); case 14: - ACCEPT_TOKEN(ts_builtin_sym_end); + if (lookahead == '\n') ADVANCE(96); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(14); END_STATE(); case 15: - ACCEPT_TOKEN(anon_sym_LF); + if (lookahead == '\n') ADVANCE(95); + if (lookahead == '\t' || + lookahead == ' ') SKIP(15) END_STATE(); case 16: - ACCEPT_TOKEN(aux_sym_headline_token1); - if (lookahead == '=') ADVANCE(16); + if (lookahead == '\n') ADVANCE(95); + if (lookahead == '\t' || + lookahead == ' ') SKIP(15) + if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(84); if (lookahead != 0 && - lookahead != '\n') ADVANCE(12); + lookahead != '\'') ADVANCE(80); END_STATE(); case 17: - ACCEPT_TOKEN(aux_sym_headline_token2); - if (lookahead == '-') ADVANCE(17); + if (lookahead == '*') ADVANCE(104); if (lookahead != 0 && - lookahead != '\n') ADVANCE(7); + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ') ADVANCE(103); END_STATE(); case 18: - ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == '(' || + lookahead == ')' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_') ADVANCE(100); END_STATE(); case 19: - ACCEPT_TOKEN(anon_sym_STAR2); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '}') ADVANCE(118); END_STATE(); case 20: - ACCEPT_TOKEN(anon_sym_SQUOTE); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '|') ADVANCE(111); END_STATE(); case 21: - ACCEPT_TOKEN(anon_sym_SQUOTE2); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '`') ADVANCE(114); END_STATE(); case 22: - ACCEPT_TOKEN(anon_sym_PIPE); + if (eof) ADVANCE(26); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\'') ADVANCE(78); + if (lookahead == '*') ADVANCE(101); + if (lookahead == '>') ADVANCE(28); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(108); + if (lookahead == '~') ADVANCE(74); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(2); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 23: - ACCEPT_TOKEN(anon_sym_PIPE2); + if (eof) ADVANCE(26); + if (lookahead == '\n') ADVANCE(91); + if (lookahead == '\'') ADVANCE(78); + if (lookahead == '*') ADVANCE(101); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(108); + if (lookahead == '~') ADVANCE(75); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(3); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 24: - ACCEPT_TOKEN(anon_sym_BQUOTE); + if (eof) ADVANCE(26); + if (lookahead == '\n') ADVANCE(27); + if (lookahead == '\'') ADVANCE(78); + if (lookahead == '*') ADVANCE(102); + if (lookahead == '-') ADVANCE(31); + if (lookahead == '=') ADVANCE(59); + if (lookahead == '>') ADVANCE(28); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(108); + if (lookahead == '~') ADVANCE(75); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(9); + if (lookahead == '+' || + lookahead == 8226) ADVANCE(32); + if (lookahead == '(' || + lookahead == ')' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z')) ADVANCE(72); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 25: - ACCEPT_TOKEN(anon_sym_BQUOTE2); + if (eof) ADVANCE(26); + if (lookahead == '\n') ADVANCE(27); + if (lookahead == '\'') ADVANCE(78); + if (lookahead == '*') ADVANCE(102); + if (lookahead == '>') ADVANCE(28); + if (lookahead == '`') ADVANCE(113); + if (lookahead == 'h') ADVANCE(62); + if (lookahead == '{') ADVANCE(117); + if (lookahead == '|') ADVANCE(108); + if (lookahead == '~') ADVANCE(75); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(10); + if (lookahead == '+' || + lookahead == '-' || + lookahead == 8226) ADVANCE(32); + if (lookahead == '(' || + lookahead == ')' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z')) ADVANCE(72); + if (lookahead != 0) ADVANCE(73); END_STATE(); case 26: - ACCEPT_TOKEN(anon_sym_LBRACE); + ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 27: - ACCEPT_TOKEN(anon_sym_RBRACE); + ACCEPT_TOKEN(aux_sym_help_file_token1); END_STATE(); - default: - return false; - } -} - -static const TSLexMode ts_lex_modes[STATE_COUNT] = { - [0] = {.lex_state = 0, .external_lex_state = 1}, - [1] = {.lex_state = 13, .external_lex_state = 2}, - [2] = {.lex_state = 13, .external_lex_state = 2}, - [3] = {.lex_state = 13, .external_lex_state = 2}, - [4] = {.lex_state = 13, .external_lex_state = 2}, - [5] = {.lex_state = 13, .external_lex_state = 2}, - [6] = {.lex_state = 13, .external_lex_state = 3}, - [7] = {.lex_state = 13, .external_lex_state = 3}, - [8] = {.lex_state = 13, .external_lex_state = 3}, - [9] = {.lex_state = 13, .external_lex_state = 2}, - [10] = {.lex_state = 13, .external_lex_state = 2}, - [11] = {.lex_state = 13, .external_lex_state = 2}, - [12] = {.lex_state = 13, .external_lex_state = 2}, - [13] = {.lex_state = 13, .external_lex_state = 2}, - [14] = {.lex_state = 13, .external_lex_state = 2}, - [15] = {.lex_state = 13, .external_lex_state = 2}, - [16] = {.lex_state = 13, .external_lex_state = 2}, - [17] = {.lex_state = 13, .external_lex_state = 2}, - [18] = {.lex_state = 13, .external_lex_state = 2}, - [19] = {.lex_state = 13, .external_lex_state = 2}, - [20] = {.lex_state = 13, .external_lex_state = 3}, - [21] = {.lex_state = 13, .external_lex_state = 3}, - [22] = {.lex_state = 13, .external_lex_state = 3}, - [23] = {.lex_state = 13, .external_lex_state = 3}, - [24] = {.lex_state = 13, .external_lex_state = 3}, - [25] = {.lex_state = 13, .external_lex_state = 3}, - [26] = {.lex_state = 13, .external_lex_state = 3}, - [27] = {.lex_state = 13, .external_lex_state = 3}, - [28] = {.lex_state = 13}, - [29] = {.lex_state = 1}, - [30] = {.lex_state = 1}, - [31] = {.lex_state = 1}, - [32] = {.lex_state = 0}, - [33] = {.lex_state = 1}, - [34] = {.lex_state = 1}, - [35] = {.lex_state = 1}, - [36] = {.lex_state = 1}, - [37] = {.lex_state = 1}, - [38] = {.lex_state = 1}, - [39] = {.lex_state = 1}, - [40] = {.lex_state = 0}, - [41] = {.lex_state = 0}, - [42] = {.lex_state = 0, .external_lex_state = 3}, - [43] = {.lex_state = 0, .external_lex_state = 4}, - [44] = {.lex_state = 0, .external_lex_state = 4}, - [45] = {.lex_state = 1}, - [46] = {.lex_state = 1}, - [47] = {.lex_state = 0}, - [48] = {.lex_state = 1}, - [49] = {.lex_state = 0}, - [50] = {.lex_state = 1}, - [51] = {.lex_state = 1}, - [52] = {.lex_state = 1}, - [53] = {.lex_state = 1}, - [54] = {.lex_state = 0}, - [55] = {.lex_state = 0, .external_lex_state = 4}, - [56] = {.lex_state = 0, .external_lex_state = 4}, - [57] = {.lex_state = 0, .external_lex_state = 4}, - [58] = {.lex_state = 0, .external_lex_state = 4}, - [59] = {.lex_state = 0, .external_lex_state = 3}, - [60] = {.lex_state = 0}, - [61] = {.lex_state = 0, .external_lex_state = 4}, - [62] = {.lex_state = 0, .external_lex_state = 4}, - [63] = {.lex_state = 0, .external_lex_state = 4}, - [64] = {.lex_state = 0, .external_lex_state = 3}, -}; - -enum { - ts_external_token_word = 0, - ts_external_token__imm_word = 1, - ts_external_token_column_name = 2, - ts_external_token_uppercase_name = 3, - ts_external_token_code_block = 4, -}; - -static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { - [ts_external_token_word] = sym_word, - [ts_external_token__imm_word] = sym__imm_word, - [ts_external_token_column_name] = sym_column_name, - [ts_external_token_uppercase_name] = sym_uppercase_name, - [ts_external_token_code_block] = sym_code_block, -}; - -static const bool ts_external_scanner_states[5][EXTERNAL_TOKEN_COUNT] = { - [1] = { - [ts_external_token_word] = true, - [ts_external_token__imm_word] = true, - [ts_external_token_column_name] = true, - [ts_external_token_uppercase_name] = true, - [ts_external_token_code_block] = true, - }, - [2] = { - [ts_external_token_word] = true, - [ts_external_token_column_name] = true, - [ts_external_token_uppercase_name] = true, - [ts_external_token_code_block] = true, - }, - [3] = { - [ts_external_token_word] = true, - }, - [4] = { - [ts_external_token__imm_word] = true, - }, -}; - -static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { - [0] = { - [ts_builtin_sym_end] = ACTIONS(1), - [anon_sym_LF] = ACTIONS(1), - [aux_sym_headline_token1] = ACTIONS(1), - [aux_sym_headline_token2] = ACTIONS(1), - [anon_sym_STAR] = ACTIONS(1), - [anon_sym_STAR2] = ACTIONS(1), - [anon_sym_SQUOTE] = ACTIONS(1), - [anon_sym_SQUOTE2] = ACTIONS(1), - [anon_sym_PIPE] = ACTIONS(1), - [anon_sym_PIPE2] = ACTIONS(1), - [anon_sym_BQUOTE] = ACTIONS(1), - [anon_sym_BQUOTE2] = ACTIONS(1), - [anon_sym_LBRACE] = ACTIONS(1), - [anon_sym_RBRACE] = ACTIONS(1), - [sym_word] = ACTIONS(1), - [sym__imm_word] = ACTIONS(1), - [sym_column_name] = ACTIONS(1), - [sym_uppercase_name] = ACTIONS(1), - [sym_code_block] = ACTIONS(1), - }, - [1] = { - [sym_help_file] = STATE(41), - [sym_headline] = STATE(2), - [sym_line] = STATE(2), - [sym__atom] = STATE(5), - [sym_column_heading] = STATE(2), - [sym_tag] = STATE(5), - [sym_option] = STATE(5), - [sym_hotlink] = STATE(5), - [sym_backtick] = STATE(5), - [sym_argument] = STATE(5), - [aux_sym_help_file_repeat1] = STATE(2), - [aux_sym_headline_repeat1] = STATE(5), - [anon_sym_LF] = ACTIONS(3), - [aux_sym_headline_token1] = ACTIONS(5), - [aux_sym_headline_token2] = ACTIONS(5), - [anon_sym_STAR] = ACTIONS(7), - [anon_sym_SQUOTE] = ACTIONS(9), - [anon_sym_PIPE] = ACTIONS(11), - [anon_sym_BQUOTE] = ACTIONS(13), - [anon_sym_LBRACE] = ACTIONS(15), - [sym_word] = ACTIONS(17), - [sym_column_name] = ACTIONS(19), - [sym_uppercase_name] = ACTIONS(21), - [sym_code_block] = ACTIONS(3), - }, - [2] = { - [sym_headline] = STATE(3), - [sym_line] = STATE(3), - [sym__atom] = STATE(5), - [sym_column_heading] = STATE(3), - [sym_tag] = STATE(5), - [sym_option] = STATE(5), - [sym_hotlink] = STATE(5), - [sym_backtick] = STATE(5), - [sym_argument] = STATE(5), - [aux_sym_help_file_repeat1] = STATE(3), - [aux_sym_headline_repeat1] = STATE(5), - [ts_builtin_sym_end] = ACTIONS(23), - [anon_sym_LF] = ACTIONS(25), - [aux_sym_headline_token1] = ACTIONS(5), - [aux_sym_headline_token2] = ACTIONS(5), - [anon_sym_STAR] = ACTIONS(7), - [anon_sym_SQUOTE] = ACTIONS(9), - [anon_sym_PIPE] = ACTIONS(11), - [anon_sym_BQUOTE] = ACTIONS(13), - [anon_sym_LBRACE] = ACTIONS(15), - [sym_word] = ACTIONS(17), - [sym_column_name] = ACTIONS(19), - [sym_uppercase_name] = ACTIONS(21), - [sym_code_block] = ACTIONS(25), - }, - [3] = { - [sym_headline] = STATE(3), - [sym_line] = STATE(3), - [sym__atom] = STATE(5), - [sym_column_heading] = STATE(3), - [sym_tag] = STATE(5), - [sym_option] = STATE(5), - [sym_hotlink] = STATE(5), - [sym_backtick] = STATE(5), - [sym_argument] = STATE(5), - [aux_sym_help_file_repeat1] = STATE(3), - [aux_sym_headline_repeat1] = STATE(5), - [ts_builtin_sym_end] = ACTIONS(27), - [anon_sym_LF] = ACTIONS(29), - [aux_sym_headline_token1] = ACTIONS(32), - [aux_sym_headline_token2] = ACTIONS(32), - [anon_sym_STAR] = ACTIONS(35), - [anon_sym_SQUOTE] = ACTIONS(38), - [anon_sym_PIPE] = ACTIONS(41), - [anon_sym_BQUOTE] = ACTIONS(44), - [anon_sym_LBRACE] = ACTIONS(47), - [sym_word] = ACTIONS(50), - [sym_column_name] = ACTIONS(53), - [sym_uppercase_name] = ACTIONS(56), - [sym_code_block] = ACTIONS(29), - }, - [4] = { - [sym__atom] = STATE(4), - [sym_tag] = STATE(4), - [sym_option] = STATE(4), - [sym_hotlink] = STATE(4), - [sym_backtick] = STATE(4), - [sym_argument] = STATE(4), - [aux_sym_headline_repeat1] = STATE(4), - [ts_builtin_sym_end] = ACTIONS(59), - [anon_sym_LF] = ACTIONS(59), - [aux_sym_headline_token1] = ACTIONS(59), - [aux_sym_headline_token2] = ACTIONS(59), - [anon_sym_STAR] = ACTIONS(61), - [anon_sym_SQUOTE] = ACTIONS(64), - [anon_sym_PIPE] = ACTIONS(67), - [anon_sym_BQUOTE] = ACTIONS(70), - [anon_sym_LBRACE] = ACTIONS(73), - [sym_word] = ACTIONS(76), - [sym_column_name] = ACTIONS(59), - [sym_uppercase_name] = ACTIONS(59), - [sym_code_block] = ACTIONS(59), - }, - [5] = { - [sym__atom] = STATE(4), - [sym_tag] = STATE(4), - [sym_option] = STATE(4), - [sym_hotlink] = STATE(4), - [sym_backtick] = STATE(4), - [sym_argument] = STATE(4), - [aux_sym_headline_repeat1] = STATE(4), - [ts_builtin_sym_end] = ACTIONS(79), - [anon_sym_LF] = ACTIONS(81), - [aux_sym_headline_token1] = ACTIONS(79), - [aux_sym_headline_token2] = ACTIONS(79), - [anon_sym_STAR] = ACTIONS(7), - [anon_sym_SQUOTE] = ACTIONS(9), - [anon_sym_PIPE] = ACTIONS(11), - [anon_sym_BQUOTE] = ACTIONS(13), - [anon_sym_LBRACE] = ACTIONS(15), - [sym_word] = ACTIONS(83), - [sym_column_name] = ACTIONS(79), - [sym_uppercase_name] = ACTIONS(79), - [sym_code_block] = ACTIONS(85), - }, -}; - -static const uint16_t ts_small_parse_table[] = { - [0] = 8, - ACTIONS(59), 1, - anon_sym_LF, - ACTIONS(87), 1, - anon_sym_STAR, - ACTIONS(90), 1, - anon_sym_SQUOTE, - ACTIONS(93), 1, - anon_sym_PIPE, - ACTIONS(96), 1, - anon_sym_BQUOTE, - ACTIONS(99), 1, - anon_sym_LBRACE, - ACTIONS(102), 1, - sym_word, - STATE(6), 7, - sym__atom, - sym_tag, - sym_option, - sym_hotlink, - sym_backtick, - sym_argument, - aux_sym_headline_repeat1, - [31] = 8, - ACTIONS(105), 1, - anon_sym_LF, - ACTIONS(107), 1, - anon_sym_STAR, - ACTIONS(109), 1, - anon_sym_SQUOTE, - ACTIONS(111), 1, + case 28: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '\n') ADVANCE(88); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(11); + if (lookahead != 0 && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 29: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '\n') ADVANCE(98); + if (lookahead == '-') ADVANCE(29); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(12); + if (lookahead != 0 && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 30: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '\n') ADVANCE(97); + if (lookahead == '=') ADVANCE(30); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(13); + if (lookahead != 0 && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 31: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == ' ') ADVANCE(92); + if (lookahead == '-') ADVANCE(46); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 32: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == ' ') ADVANCE(92); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 33: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+') ADVANCE(33); + if (lookahead == '-') ADVANCE(63); + if (lookahead == '=') ADVANCE(64); + if (lookahead == '|') ADVANCE(76); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 34: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+') ADVANCE(33); + if (lookahead == '-') ADVANCE(63); + if (lookahead == '=') ADVANCE(64); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 35: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+') ADVANCE(34); + if (lookahead == '-') ADVANCE(66); + if (lookahead == '=') ADVANCE(69); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 36: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+') ADVANCE(35); + if (lookahead == '-') ADVANCE(67); + if (lookahead == '=') ADVANCE(70); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 37: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(29); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 38: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(37); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 39: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(38); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 40: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(39); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 41: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(40); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 42: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(41); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 43: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(42); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 44: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(43); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 45: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(44); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 46: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '-') ADVANCE(45); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 47: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == ':') ADVANCE(65); + if (lookahead == 's') ADVANCE(48); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 48: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == ':') ADVANCE(65); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 49: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(30); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 50: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(49); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 51: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(50); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 52: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(51); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 53: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(52); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 54: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(53); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 55: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(54); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 56: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(55); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 57: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(56); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 58: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(57); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 59: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '=') ADVANCE(58); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 60: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == 'p') ADVANCE(47); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 61: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == 't') ADVANCE(60); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 62: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == 't') ADVANCE(61); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 63: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '|') ADVANCE(76); + if (lookahead == '+' || + lookahead == '-') ADVANCE(63); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 64: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '|') ADVANCE(76); + if (lookahead == '+' || + lookahead == '=') ADVANCE(64); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 65: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == ')' || + lookahead == ']') ADVANCE(73); + if (lookahead == '{' || + lookahead == '~') ADVANCE(106); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ') ADVANCE(105); + END_STATE(); + case 66: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+' || + lookahead == '-') ADVANCE(63); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 67: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+' || + lookahead == '-') ADVANCE(66); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 68: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+' || + lookahead == '-') ADVANCE(67); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 69: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+' || + lookahead == '=') ADVANCE(64); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 70: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+' || + lookahead == '=') ADVANCE(69); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 71: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '+' || + lookahead == '=') ADVANCE(70); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 72: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead == '(' || + lookahead == ')' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_') ADVANCE(99); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 73: + ACCEPT_TOKEN(aux_sym_word_token1); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '~') ADVANCE(73); + END_STATE(); + case 74: + ACCEPT_TOKEN(aux_sym_word_token2); + if (lookahead == '\n') ADVANCE(96); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(14); + if (lookahead != 0) ADVANCE(75); + END_STATE(); + case 75: + ACCEPT_TOKEN(aux_sym_word_token2); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ') ADVANCE(75); + END_STATE(); + case 76: + ACCEPT_TOKEN(aux_sym_word_token3); + END_STATE(); + case 77: + ACCEPT_TOKEN(aux_sym_word_token4); + END_STATE(); + case 78: + ACCEPT_TOKEN(anon_sym_SQUOTE); + END_STATE(); + case 79: + ACCEPT_TOKEN(anon_sym_SQUOTE); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(77); + END_STATE(); + case 80: + ACCEPT_TOKEN(aux_sym_word_token5); + if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(80); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '\'') ADVANCE(80); + END_STATE(); + case 81: + ACCEPT_TOKEN(anon_sym_SQUOTE2); + END_STATE(); + case 82: + ACCEPT_TOKEN(aux_sym_word_token6); + END_STATE(); + case 83: + ACCEPT_TOKEN(aux_sym_word_token6); + if (lookahead == '\n') ADVANCE(89); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(8); + END_STATE(); + case 84: + ACCEPT_TOKEN(aux_sym_word_token6); + if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(107); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '\'') ADVANCE(80); + END_STATE(); + case 85: + ACCEPT_TOKEN(aux_sym_word_token7); + END_STATE(); + case 86: + ACCEPT_TOKEN(aux_sym_word_token8); + if (lookahead == '|') ADVANCE(86); + END_STATE(); + case 87: + ACCEPT_TOKEN(aux_sym_word_token9); + END_STATE(); + case 88: + ACCEPT_TOKEN(aux_sym_codeblock_token1); + END_STATE(); + case 89: + ACCEPT_TOKEN(aux_sym_codeblock_token2); + END_STATE(); + case 90: + ACCEPT_TOKEN(aux_sym_codeblock_token2); + if (lookahead == '\n') ADVANCE(89); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(8); + END_STATE(); + case 91: + ACCEPT_TOKEN(anon_sym_LF); + END_STATE(); + case 92: + ACCEPT_TOKEN(aux_sym_line_li_token1); + if (lookahead == ' ') ADVANCE(92); + END_STATE(); + case 93: + ACCEPT_TOKEN(aux_sym_line_code_token1); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(93); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(94); + END_STATE(); + case 94: + ACCEPT_TOKEN(aux_sym_line_code_token1); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(94); + END_STATE(); + case 95: + ACCEPT_TOKEN(aux_sym_line_code_token2); + END_STATE(); + case 96: + ACCEPT_TOKEN(aux_sym_column_heading_token1); + END_STATE(); + case 97: + ACCEPT_TOKEN(aux_sym_h1_token1); + END_STATE(); + case 98: + ACCEPT_TOKEN(aux_sym_h2_token1); + END_STATE(); + case 99: + ACCEPT_TOKEN(aux_sym_uppercase_name_token1); + if (lookahead == '(' || + lookahead == ')' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_') ADVANCE(99); + END_STATE(); + case 100: + ACCEPT_TOKEN(aux_sym_uppercase_name_token2); + if (lookahead == '(' || + lookahead == ')' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_') ADVANCE(100); + END_STATE(); + case 101: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 102: + ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == ' ') ADVANCE(92); + END_STATE(); + case 103: + ACCEPT_TOKEN(aux_sym_tag_token1); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '*') ADVANCE(103); + END_STATE(); + case 104: + ACCEPT_TOKEN(anon_sym_STAR2); + END_STATE(); + case 105: + ACCEPT_TOKEN(sym_url_word); + if (lookahead == '{' || + lookahead == '~') ADVANCE(106); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != ')' && + lookahead != ']') ADVANCE(105); + END_STATE(); + case 106: + ACCEPT_TOKEN(sym_url_word); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != ')' && + lookahead != ']') ADVANCE(106); + END_STATE(); + case 107: + ACCEPT_TOKEN(aux_sym_optionlink_token1); + if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(107); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '\'') ADVANCE(80); + END_STATE(); + case 108: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '+') ADVANCE(36); + if (lookahead == '-') ADVANCE(68); + if (lookahead == '=') ADVANCE(71); + if (lookahead == '|') ADVANCE(86); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '+') ADVANCE(36); + if (lookahead == '-') ADVANCE(68); + if (lookahead == '=') ADVANCE(71); + if (lookahead == '|') ADVANCE(86); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(85); + END_STATE(); + case 110: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(85); + END_STATE(); + case 111: + ACCEPT_TOKEN(aux_sym_taglink_token1); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '|') ADVANCE(111); + END_STATE(); + case 112: + ACCEPT_TOKEN(anon_sym_PIPE2); + END_STATE(); + case 113: + ACCEPT_TOKEN(anon_sym_BQUOTE); + END_STATE(); + case 114: + ACCEPT_TOKEN(aux_sym_codespan_token1); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '`') ADVANCE(114); + END_STATE(); + case 115: + ACCEPT_TOKEN(anon_sym_BQUOTE2); + END_STATE(); + case 116: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 117: + ACCEPT_TOKEN(anon_sym_LBRACE); + if (lookahead == '}') ADVANCE(87); + END_STATE(); + case 118: + ACCEPT_TOKEN(aux_sym_argument_token1); + if (lookahead != 0 && + lookahead != '\t' && + lookahead != '\n' && + lookahead != ' ' && + lookahead != '{' && + lookahead != '}') ADVANCE(118); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 24}, + [2] = {.lex_state = 24}, + [3] = {.lex_state = 24}, + [4] = {.lex_state = 24}, + [5] = {.lex_state = 24}, + [6] = {.lex_state = 25}, + [7] = {.lex_state = 25}, + [8] = {.lex_state = 25}, + [9] = {.lex_state = 22}, + [10] = {.lex_state = 22}, + [11] = {.lex_state = 22}, + [12] = {.lex_state = 23}, + [13] = {.lex_state = 23}, + [14] = {.lex_state = 23}, + [15] = {.lex_state = 23}, + [16] = {.lex_state = 23}, + [17] = {.lex_state = 23}, + [18] = {.lex_state = 23}, + [19] = {.lex_state = 23}, + [20] = {.lex_state = 23}, + [21] = {.lex_state = 24}, + [22] = {.lex_state = 24}, + [23] = {.lex_state = 24}, + [24] = {.lex_state = 24}, + [25] = {.lex_state = 24}, + [26] = {.lex_state = 24}, + [27] = {.lex_state = 24}, + [28] = {.lex_state = 24}, + [29] = {.lex_state = 24}, + [30] = {.lex_state = 24}, + [31] = {.lex_state = 24}, + [32] = {.lex_state = 24}, + [33] = {.lex_state = 25}, + [34] = {.lex_state = 25}, + [35] = {.lex_state = 25}, + [36] = {.lex_state = 25}, + [37] = {.lex_state = 22}, + [38] = {.lex_state = 22}, + [39] = {.lex_state = 25}, + [40] = {.lex_state = 22}, + [41] = {.lex_state = 22}, + [42] = {.lex_state = 22}, + [43] = {.lex_state = 25}, + [44] = {.lex_state = 22}, + [45] = {.lex_state = 22}, + [46] = {.lex_state = 22}, + [47] = {.lex_state = 25}, + [48] = {.lex_state = 23}, + [49] = {.lex_state = 23}, + [50] = {.lex_state = 23}, + [51] = {.lex_state = 23}, + [52] = {.lex_state = 23}, + [53] = {.lex_state = 23}, + [54] = {.lex_state = 23}, + [55] = {.lex_state = 23}, + [56] = {.lex_state = 22}, + [57] = {.lex_state = 6}, + [58] = {.lex_state = 1}, + [59] = {.lex_state = 6}, + [60] = {.lex_state = 1}, + [61] = {.lex_state = 1}, + [62] = {.lex_state = 6}, + [63] = {.lex_state = 22}, + [64] = {.lex_state = 22}, + [65] = {.lex_state = 6}, + [66] = {.lex_state = 16}, + [67] = {.lex_state = 16}, + [68] = {.lex_state = 6}, + [69] = {.lex_state = 22}, + [70] = {.lex_state = 0}, + [71] = {.lex_state = 17}, + [72] = {.lex_state = 1}, + [73] = {.lex_state = 1}, + [74] = {.lex_state = 1}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 0}, + [77] = {.lex_state = 17}, + [78] = {.lex_state = 21}, + [79] = {.lex_state = 19}, + [80] = {.lex_state = 0}, + [81] = {.lex_state = 0}, + [82] = {.lex_state = 16}, + [83] = {.lex_state = 0}, + [84] = {.lex_state = 1}, + [85] = {.lex_state = 1}, + [86] = {.lex_state = 1}, + [87] = {.lex_state = 1}, + [88] = {.lex_state = 17}, + [89] = {.lex_state = 1}, + [90] = {.lex_state = 1}, + [91] = {.lex_state = 1}, + [92] = {.lex_state = 20}, + [93] = {.lex_state = 17}, + [94] = {.lex_state = 20}, + [95] = {.lex_state = 21}, + [96] = {.lex_state = 19}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [aux_sym_help_file_token1] = ACTIONS(1), + [aux_sym_word_token1] = ACTIONS(1), + [aux_sym_word_token2] = ACTIONS(1), + [aux_sym_word_token4] = ACTIONS(1), + [anon_sym_SQUOTE] = ACTIONS(1), + [anon_sym_SQUOTE2] = ACTIONS(1), + [aux_sym_word_token6] = ACTIONS(1), + [aux_sym_word_token7] = ACTIONS(1), + [aux_sym_codeblock_token2] = ACTIONS(1), + [anon_sym_LF] = ACTIONS(1), + [aux_sym_line_code_token2] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_STAR2] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_PIPE2] = ACTIONS(1), + [anon_sym_BQUOTE] = ACTIONS(1), + [anon_sym_BQUOTE2] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + }, + [1] = { + [sym_help_file] = STATE(70), + [sym__atom] = STATE(9), + [sym_word] = STATE(9), + [sym_block] = STATE(3), + [sym_block_end] = STATE(75), + [sym_codeblock] = STATE(34), + [sym_line] = STATE(6), + [sym_line_noeol] = STATE(76), + [sym_line_li] = STATE(6), + [sym_line_li_noeol] = STATE(76), + [sym_column_heading] = STATE(34), + [sym_h1] = STATE(3), + [sym_h2] = STATE(3), + [sym_uppercase_name] = STATE(56), + [sym_h3] = STATE(3), + [sym_tag] = STATE(9), + [sym_url] = STATE(9), + [sym_optionlink] = STATE(9), + [sym_taglink] = STATE(9), + [sym_codespan] = STATE(9), + [sym_argument] = STATE(9), + [aux_sym_help_file_repeat1] = STATE(2), + [aux_sym_help_file_repeat2] = STATE(3), + [aux_sym_block_repeat1] = STATE(6), + [aux_sym_line_repeat1] = STATE(9), + [ts_builtin_sym_end] = ACTIONS(3), + [aux_sym_help_file_token1] = ACTIONS(5), + [aux_sym_word_token1] = ACTIONS(7), + [aux_sym_word_token2] = ACTIONS(7), + [aux_sym_word_token3] = ACTIONS(9), + [aux_sym_word_token4] = ACTIONS(9), + [anon_sym_SQUOTE] = ACTIONS(11), + [aux_sym_word_token7] = ACTIONS(9), + [aux_sym_word_token8] = ACTIONS(7), + [aux_sym_word_token9] = ACTIONS(9), + [aux_sym_codeblock_token1] = ACTIONS(13), + [aux_sym_line_li_token1] = ACTIONS(15), + [aux_sym_h1_token1] = ACTIONS(17), + [aux_sym_h2_token1] = ACTIONS(19), + [aux_sym_uppercase_name_token1] = ACTIONS(21), + [anon_sym_STAR] = ACTIONS(23), + [sym_url_word] = ACTIONS(25), + [anon_sym_PIPE] = ACTIONS(27), + [anon_sym_BQUOTE] = ACTIONS(29), + [anon_sym_LBRACE] = ACTIONS(31), + }, + [2] = { + [sym__atom] = STATE(9), + [sym_word] = STATE(9), + [sym_block] = STATE(4), + [sym_block_end] = STATE(83), + [sym_codeblock] = STATE(34), + [sym_line] = STATE(6), + [sym_line_noeol] = STATE(76), + [sym_line_li] = STATE(6), + [sym_line_li_noeol] = STATE(76), + [sym_column_heading] = STATE(34), + [sym_h1] = STATE(4), + [sym_h2] = STATE(4), + [sym_uppercase_name] = STATE(56), + [sym_h3] = STATE(4), + [sym_tag] = STATE(9), + [sym_url] = STATE(9), + [sym_optionlink] = STATE(9), + [sym_taglink] = STATE(9), + [sym_codespan] = STATE(9), + [sym_argument] = STATE(9), + [aux_sym_help_file_repeat1] = STATE(30), + [aux_sym_help_file_repeat2] = STATE(4), + [aux_sym_block_repeat1] = STATE(6), + [aux_sym_line_repeat1] = STATE(9), + [ts_builtin_sym_end] = ACTIONS(33), + [aux_sym_help_file_token1] = ACTIONS(35), + [aux_sym_word_token1] = ACTIONS(7), + [aux_sym_word_token2] = ACTIONS(7), + [aux_sym_word_token3] = ACTIONS(9), + [aux_sym_word_token4] = ACTIONS(9), + [anon_sym_SQUOTE] = ACTIONS(11), + [aux_sym_word_token7] = ACTIONS(9), + [aux_sym_word_token8] = ACTIONS(7), + [aux_sym_word_token9] = ACTIONS(9), + [aux_sym_codeblock_token1] = ACTIONS(13), + [aux_sym_line_li_token1] = ACTIONS(15), + [aux_sym_h1_token1] = ACTIONS(17), + [aux_sym_h2_token1] = ACTIONS(19), + [aux_sym_uppercase_name_token1] = ACTIONS(21), + [anon_sym_STAR] = ACTIONS(23), + [sym_url_word] = ACTIONS(25), + [anon_sym_PIPE] = ACTIONS(27), + [anon_sym_BQUOTE] = ACTIONS(29), + [anon_sym_LBRACE] = ACTIONS(31), + }, + [3] = { + [sym__atom] = STATE(9), + [sym_word] = STATE(9), + [sym_block] = STATE(5), + [sym_block_end] = STATE(83), + [sym_codeblock] = STATE(34), + [sym_line] = STATE(6), + [sym_line_noeol] = STATE(76), + [sym_line_li] = STATE(6), + [sym_line_li_noeol] = STATE(76), + [sym_column_heading] = STATE(34), + [sym_h1] = STATE(5), + [sym_h2] = STATE(5), + [sym_uppercase_name] = STATE(56), + [sym_h3] = STATE(5), + [sym_tag] = STATE(9), + [sym_url] = STATE(9), + [sym_optionlink] = STATE(9), + [sym_taglink] = STATE(9), + [sym_codespan] = STATE(9), + [sym_argument] = STATE(9), + [aux_sym_help_file_repeat2] = STATE(5), + [aux_sym_block_repeat1] = STATE(6), + [aux_sym_line_repeat1] = STATE(9), + [ts_builtin_sym_end] = ACTIONS(33), + [aux_sym_word_token1] = ACTIONS(7), + [aux_sym_word_token2] = ACTIONS(7), + [aux_sym_word_token3] = ACTIONS(9), + [aux_sym_word_token4] = ACTIONS(9), + [anon_sym_SQUOTE] = ACTIONS(11), + [aux_sym_word_token7] = ACTIONS(9), + [aux_sym_word_token8] = ACTIONS(7), + [aux_sym_word_token9] = ACTIONS(9), + [aux_sym_codeblock_token1] = ACTIONS(13), + [aux_sym_line_li_token1] = ACTIONS(15), + [aux_sym_h1_token1] = ACTIONS(17), + [aux_sym_h2_token1] = ACTIONS(19), + [aux_sym_uppercase_name_token1] = ACTIONS(21), + [anon_sym_STAR] = ACTIONS(23), + [sym_url_word] = ACTIONS(25), + [anon_sym_PIPE] = ACTIONS(27), + [anon_sym_BQUOTE] = ACTIONS(29), + [anon_sym_LBRACE] = ACTIONS(31), + }, + [4] = { + [sym__atom] = STATE(9), + [sym_word] = STATE(9), + [sym_block] = STATE(5), + [sym_block_end] = STATE(80), + [sym_codeblock] = STATE(34), + [sym_line] = STATE(6), + [sym_line_noeol] = STATE(76), + [sym_line_li] = STATE(6), + [sym_line_li_noeol] = STATE(76), + [sym_column_heading] = STATE(34), + [sym_h1] = STATE(5), + [sym_h2] = STATE(5), + [sym_uppercase_name] = STATE(56), + [sym_h3] = STATE(5), + [sym_tag] = STATE(9), + [sym_url] = STATE(9), + [sym_optionlink] = STATE(9), + [sym_taglink] = STATE(9), + [sym_codespan] = STATE(9), + [sym_argument] = STATE(9), + [aux_sym_help_file_repeat2] = STATE(5), + [aux_sym_block_repeat1] = STATE(6), + [aux_sym_line_repeat1] = STATE(9), + [ts_builtin_sym_end] = ACTIONS(37), + [aux_sym_word_token1] = ACTIONS(7), + [aux_sym_word_token2] = ACTIONS(7), + [aux_sym_word_token3] = ACTIONS(9), + [aux_sym_word_token4] = ACTIONS(9), + [anon_sym_SQUOTE] = ACTIONS(11), + [aux_sym_word_token7] = ACTIONS(9), + [aux_sym_word_token8] = ACTIONS(7), + [aux_sym_word_token9] = ACTIONS(9), + [aux_sym_codeblock_token1] = ACTIONS(13), + [aux_sym_line_li_token1] = ACTIONS(15), + [aux_sym_h1_token1] = ACTIONS(17), + [aux_sym_h2_token1] = ACTIONS(19), + [aux_sym_uppercase_name_token1] = ACTIONS(21), + [anon_sym_STAR] = ACTIONS(23), + [sym_url_word] = ACTIONS(25), + [anon_sym_PIPE] = ACTIONS(27), + [anon_sym_BQUOTE] = ACTIONS(29), + [anon_sym_LBRACE] = ACTIONS(31), + }, + [5] = { + [sym__atom] = STATE(10), + [sym_word] = STATE(10), + [sym_block] = STATE(5), + [sym_codeblock] = STATE(39), + [sym_line] = STATE(7), + [sym_line_li] = STATE(7), + [sym_column_heading] = STATE(39), + [sym_h1] = STATE(5), + [sym_h2] = STATE(5), + [sym_uppercase_name] = STATE(56), + [sym_h3] = STATE(5), + [sym_tag] = STATE(10), + [sym_url] = STATE(10), + [sym_optionlink] = STATE(10), + [sym_taglink] = STATE(10), + [sym_codespan] = STATE(10), + [sym_argument] = STATE(10), + [aux_sym_help_file_repeat2] = STATE(5), + [aux_sym_block_repeat1] = STATE(7), + [aux_sym_line_repeat1] = STATE(10), + [ts_builtin_sym_end] = ACTIONS(39), + [aux_sym_word_token1] = ACTIONS(41), + [aux_sym_word_token2] = ACTIONS(41), + [aux_sym_word_token3] = ACTIONS(44), + [aux_sym_word_token4] = ACTIONS(44), + [anon_sym_SQUOTE] = ACTIONS(47), + [aux_sym_word_token7] = ACTIONS(44), + [aux_sym_word_token8] = ACTIONS(41), + [aux_sym_word_token9] = ACTIONS(44), + [aux_sym_codeblock_token1] = ACTIONS(50), + [aux_sym_line_li_token1] = ACTIONS(53), + [aux_sym_h1_token1] = ACTIONS(56), + [aux_sym_h2_token1] = ACTIONS(59), + [aux_sym_uppercase_name_token1] = ACTIONS(62), + [anon_sym_STAR] = ACTIONS(65), + [sym_url_word] = ACTIONS(68), + [anon_sym_PIPE] = ACTIONS(71), + [anon_sym_BQUOTE] = ACTIONS(74), + [anon_sym_LBRACE] = ACTIONS(77), + }, + [6] = { + [sym__atom] = STATE(9), + [sym_word] = STATE(9), + [sym_codeblock] = STATE(34), + [sym_line] = STATE(8), + [sym_line_noeol] = STATE(81), + [sym_line_li] = STATE(8), + [sym_line_li_noeol] = STATE(81), + [sym_column_heading] = STATE(34), + [sym_uppercase_name] = STATE(69), + [sym_tag] = STATE(9), + [sym_url] = STATE(9), + [sym_optionlink] = STATE(9), + [sym_taglink] = STATE(9), + [sym_codespan] = STATE(9), + [sym_argument] = STATE(9), + [aux_sym_block_repeat1] = STATE(8), + [aux_sym_block_repeat2] = STATE(29), + [aux_sym_line_repeat1] = STATE(9), + [aux_sym_help_file_token1] = ACTIONS(80), + [aux_sym_word_token1] = ACTIONS(7), + [aux_sym_word_token2] = ACTIONS(7), + [aux_sym_word_token3] = ACTIONS(9), + [aux_sym_word_token4] = ACTIONS(9), + [anon_sym_SQUOTE] = ACTIONS(11), + [aux_sym_word_token7] = ACTIONS(9), + [aux_sym_word_token8] = ACTIONS(7), + [aux_sym_word_token9] = ACTIONS(9), + [aux_sym_codeblock_token1] = ACTIONS(13), + [aux_sym_line_li_token1] = ACTIONS(15), + [aux_sym_uppercase_name_token1] = ACTIONS(21), + [anon_sym_STAR] = ACTIONS(23), + [sym_url_word] = ACTIONS(25), + [anon_sym_PIPE] = ACTIONS(27), + [anon_sym_BQUOTE] = ACTIONS(29), + [anon_sym_LBRACE] = ACTIONS(31), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 17, + ACTIONS(11), 1, + anon_sym_SQUOTE, + ACTIONS(13), 1, + aux_sym_codeblock_token1, + ACTIONS(21), 1, + aux_sym_uppercase_name_token1, + ACTIONS(23), 1, + anon_sym_STAR, + ACTIONS(25), 1, + sym_url_word, + ACTIONS(27), 1, + anon_sym_PIPE, + ACTIONS(29), 1, + anon_sym_BQUOTE, + ACTIONS(31), 1, + anon_sym_LBRACE, + ACTIONS(80), 1, + aux_sym_help_file_token1, + ACTIONS(82), 1, + aux_sym_line_li_token1, + STATE(29), 1, + aux_sym_block_repeat2, + STATE(69), 1, + sym_uppercase_name, + STATE(39), 2, + sym_codeblock, + sym_column_heading, + ACTIONS(7), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + STATE(8), 3, + sym_line, + sym_line_li, + aux_sym_block_repeat1, + ACTIONS(9), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(10), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [68] = 16, + ACTIONS(84), 1, + aux_sym_help_file_token1, + ACTIONS(92), 1, + anon_sym_SQUOTE, + ACTIONS(95), 1, + aux_sym_codeblock_token1, + ACTIONS(98), 1, + aux_sym_line_li_token1, + ACTIONS(101), 1, + aux_sym_uppercase_name_token1, + ACTIONS(104), 1, + anon_sym_STAR, + ACTIONS(107), 1, + sym_url_word, + ACTIONS(110), 1, anon_sym_PIPE, ACTIONS(113), 1, anon_sym_BQUOTE, - ACTIONS(115), 1, + ACTIONS(116), 1, + anon_sym_LBRACE, + STATE(69), 1, + sym_uppercase_name, + STATE(39), 2, + sym_codeblock, + sym_column_heading, + ACTIONS(86), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + STATE(8), 3, + sym_line, + sym_line_li, + aux_sym_block_repeat1, + ACTIONS(89), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(10), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [133] = 14, + ACTIONS(11), 1, + anon_sym_SQUOTE, + ACTIONS(13), 1, + aux_sym_codeblock_token1, + ACTIONS(25), 1, + sym_url_word, + ACTIONS(27), 1, + anon_sym_PIPE, + ACTIONS(29), 1, + anon_sym_BQUOTE, + ACTIONS(31), 1, + anon_sym_LBRACE, + ACTIONS(119), 1, + ts_builtin_sym_end, + ACTIONS(121), 1, + anon_sym_LF, + ACTIONS(123), 1, + aux_sym_column_heading_token1, + ACTIONS(125), 1, + anon_sym_STAR, + STATE(36), 1, + sym_codeblock, + ACTIONS(7), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(9), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(11), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [189] = 13, + ACTIONS(11), 1, + anon_sym_SQUOTE, + ACTIONS(13), 1, + aux_sym_codeblock_token1, + ACTIONS(25), 1, + sym_url_word, + ACTIONS(27), 1, + anon_sym_PIPE, + ACTIONS(29), 1, + anon_sym_BQUOTE, + ACTIONS(31), 1, + anon_sym_LBRACE, + ACTIONS(123), 1, + aux_sym_column_heading_token1, + ACTIONS(125), 1, + anon_sym_STAR, + ACTIONS(127), 1, + anon_sym_LF, + STATE(47), 1, + sym_codeblock, + ACTIONS(7), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(9), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(11), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [242] = 10, + ACTIONS(137), 1, + anon_sym_SQUOTE, + ACTIONS(140), 1, + anon_sym_STAR, + ACTIONS(143), 1, + sym_url_word, + ACTIONS(146), 1, + anon_sym_PIPE, + ACTIONS(149), 1, + anon_sym_BQUOTE, + ACTIONS(152), 1, + anon_sym_LBRACE, + ACTIONS(131), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(129), 4, + ts_builtin_sym_end, + aux_sym_codeblock_token1, + anon_sym_LF, + aux_sym_column_heading_token1, + ACTIONS(134), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(11), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [289] = 10, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(164), 1, + anon_sym_STAR, + ACTIONS(167), 1, + sym_url_word, + ACTIONS(170), 1, + anon_sym_PIPE, + ACTIONS(173), 1, + anon_sym_BQUOTE, + ACTIONS(176), 1, + anon_sym_LBRACE, + ACTIONS(129), 2, + ts_builtin_sym_end, + anon_sym_LF, + ACTIONS(155), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(158), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(12), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [334] = 11, + ACTIONS(179), 1, + ts_builtin_sym_end, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_LF, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, + anon_sym_PIPE, + ACTIONS(195), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_LBRACE, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(12), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [381] = 10, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, + anon_sym_PIPE, + ACTIONS(195), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_LBRACE, + ACTIONS(199), 1, + anon_sym_LF, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(12), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [425] = 10, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_LF, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, + anon_sym_PIPE, + ACTIONS(195), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_LBRACE, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(12), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [469] = 10, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, + anon_sym_PIPE, + ACTIONS(195), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_LBRACE, + ACTIONS(201), 1, + anon_sym_LF, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(12), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [513] = 9, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, + anon_sym_PIPE, + ACTIONS(195), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_LBRACE, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(13), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [554] = 9, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, + anon_sym_PIPE, + ACTIONS(195), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_LBRACE, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(16), 9, + sym__atom, + sym_word, + sym_tag, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, + sym_argument, + aux_sym_line_repeat1, + [595] = 9, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, + anon_sym_PIPE, + ACTIONS(195), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, anon_sym_LBRACE, - ACTIONS(117), 1, - sym_word, - STATE(6), 7, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(15), 9, sym__atom, + sym_word, sym_tag, - sym_option, - sym_hotlink, - sym_backtick, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, sym_argument, - aux_sym_headline_repeat1, - [62] = 7, - ACTIONS(107), 1, - anon_sym_STAR, - ACTIONS(109), 1, + aux_sym_line_repeat1, + [636] = 9, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(111), 1, + ACTIONS(189), 1, + anon_sym_STAR, + ACTIONS(191), 1, + sym_url_word, + ACTIONS(193), 1, anon_sym_PIPE, - ACTIONS(113), 1, + ACTIONS(195), 1, anon_sym_BQUOTE, - ACTIONS(115), 1, + ACTIONS(197), 1, anon_sym_LBRACE, - ACTIONS(119), 1, - sym_word, - STATE(7), 7, + ACTIONS(181), 3, + aux_sym_word_token1, + aux_sym_word_token2, + aux_sym_word_token8, + ACTIONS(183), 4, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + STATE(14), 9, sym__atom, + sym_word, sym_tag, - sym_option, - sym_hotlink, - sym_backtick, + sym_url, + sym_optionlink, + sym_taglink, + sym_codespan, sym_argument, - aux_sym_headline_repeat1, - [90] = 1, - ACTIONS(121), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + aux_sym_line_repeat1, + [677] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(24), 1, + aux_sym_block_repeat2, + ACTIONS(205), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, + anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(203), 12, ts_builtin_sym_end, - anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [707] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(24), 1, + aux_sym_block_repeat2, + ACTIONS(209), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_STAR, + anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(207), 12, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [737] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(24), 1, + aux_sym_block_repeat2, + ACTIONS(213), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(211), 12, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, + [767] = 4, + ACTIONS(217), 1, + aux_sym_help_file_token1, + STATE(24), 1, + aux_sym_block_repeat2, + ACTIONS(220), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, + anon_sym_PIPE, anon_sym_LBRACE, - [106] = 1, - ACTIONS(123), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(215), 12, ts_builtin_sym_end, - anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [797] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(22), 1, + aux_sym_block_repeat2, + ACTIONS(224), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_STAR, + anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(222), 12, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [827] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(24), 1, + aux_sym_block_repeat2, + ACTIONS(224), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(222), 12, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, + [857] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(23), 1, + aux_sym_block_repeat2, + ACTIONS(228), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, + anon_sym_PIPE, anon_sym_LBRACE, - [122] = 1, - ACTIONS(125), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(226), 12, ts_builtin_sym_end, - anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [887] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(21), 1, + aux_sym_block_repeat2, + ACTIONS(232), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_STAR, + anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(230), 12, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [917] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(24), 1, + aux_sym_block_repeat2, + ACTIONS(236), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(234), 12, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, + [947] = 4, + ACTIONS(240), 1, + aux_sym_help_file_token1, + STATE(30), 1, + aux_sym_help_file_repeat1, + ACTIONS(243), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, + anon_sym_PIPE, anon_sym_LBRACE, - [138] = 1, - ACTIONS(127), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(238), 12, ts_builtin_sym_end, - anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [977] = 4, + ACTIONS(80), 1, + aux_sym_help_file_token1, + STATE(26), 1, + aux_sym_block_repeat2, + ACTIONS(247), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_STAR, + anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(245), 12, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [1007] = 2, + ACTIONS(251), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(249), 13, + ts_builtin_sym_end, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_h1_token1, + aux_sym_h2_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, + [1032] = 2, + ACTIONS(255), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, + anon_sym_PIPE, anon_sym_LBRACE, - [154] = 1, - ACTIONS(129), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(253), 11, ts_builtin_sym_end, - anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [1055] = 3, + ACTIONS(119), 1, + ts_builtin_sym_end, + ACTIONS(259), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, + anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(257), 10, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [1080] = 2, + ACTIONS(263), 7, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_STAR, + anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(261), 11, + ts_builtin_sym_end, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_uppercase_name_token1, + sym_url_word, + anon_sym_BQUOTE, + [1103] = 3, + ACTIONS(265), 1, + ts_builtin_sym_end, + ACTIONS(269), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(267), 10, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, + [1128] = 2, + ACTIONS(273), 6, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_PIPE, anon_sym_LBRACE, - [170] = 1, - ACTIONS(131), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(271), 11, ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_column_heading_token1, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1150] = 2, + ACTIONS(277), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [186] = 1, - ACTIONS(133), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(275), 11, ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_column_heading_token1, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1172] = 2, + ACTIONS(259), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(257), 10, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, + [1194] = 2, + ACTIONS(281), 6, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_PIPE, anon_sym_LBRACE, - [202] = 1, - ACTIONS(135), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(279), 11, ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_column_heading_token1, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1216] = 2, + ACTIONS(285), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [218] = 1, - ACTIONS(137), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(283), 11, ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_column_heading_token1, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1238] = 2, + ACTIONS(289), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [234] = 1, - ACTIONS(139), 13, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(287), 11, ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, anon_sym_LF, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_column_heading_token1, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1260] = 2, + ACTIONS(293), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(291), 10, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, + [1282] = 2, + ACTIONS(297), 6, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_PIPE, anon_sym_LBRACE, - [250] = 2, - ACTIONS(141), 1, - anon_sym_LF, - ACTIONS(131), 12, - sym_word, - sym_column_name, - sym_uppercase_name, - sym_code_block, + ACTIONS(295), 11, ts_builtin_sym_end, - aux_sym_headline_token1, - aux_sym_headline_token2, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + anon_sym_LF, + aux_sym_column_heading_token1, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1304] = 2, + ACTIONS(301), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [268] = 7, - ACTIONS(143), 1, + ACTIONS(299), 11, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + anon_sym_LF, + aux_sym_column_heading_token1, anon_sym_STAR, - ACTIONS(145), 1, + sym_url_word, + anon_sym_BQUOTE, + [1326] = 2, + ACTIONS(305), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, - ACTIONS(147), 1, + aux_sym_word_token8, anon_sym_PIPE, - ACTIONS(149), 1, - anon_sym_BQUOTE, - ACTIONS(151), 1, anon_sym_LBRACE, - ACTIONS(153), 1, - sym_word, - STATE(50), 6, - sym__atom, - sym_tag, - sym_option, - sym_hotlink, - sym_backtick, - sym_argument, - [295] = 7, - ACTIONS(143), 1, + ACTIONS(303), 11, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + anon_sym_LF, + aux_sym_column_heading_token1, anon_sym_STAR, - ACTIONS(145), 1, + sym_url_word, + anon_sym_BQUOTE, + [1348] = 2, + ACTIONS(269), 7, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, - ACTIONS(147), 1, + aux_sym_word_token8, + anon_sym_STAR, anon_sym_PIPE, - ACTIONS(149), 1, + anon_sym_LBRACE, + ACTIONS(267), 10, + aux_sym_help_file_token1, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + aux_sym_codeblock_token1, + aux_sym_line_li_token1, + aux_sym_uppercase_name_token1, + sym_url_word, anon_sym_BQUOTE, - ACTIONS(151), 1, + [1370] = 2, + ACTIONS(297), 6, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_PIPE, anon_sym_LBRACE, - ACTIONS(155), 1, - sym_word, - STATE(30), 6, - sym__atom, - sym_tag, - sym_option, - sym_hotlink, - sym_backtick, - sym_argument, - [322] = 7, - ACTIONS(143), 1, + ACTIONS(295), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + anon_sym_LF, anon_sym_STAR, - ACTIONS(145), 1, + sym_url_word, + anon_sym_BQUOTE, + [1390] = 2, + ACTIONS(305), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, - ACTIONS(147), 1, + aux_sym_word_token8, anon_sym_PIPE, - ACTIONS(149), 1, - anon_sym_BQUOTE, - ACTIONS(151), 1, anon_sym_LBRACE, - ACTIONS(157), 1, - sym_word, - STATE(45), 6, - sym__atom, - sym_tag, - sym_option, - sym_hotlink, - sym_backtick, - sym_argument, - [349] = 1, - ACTIONS(121), 7, - sym_word, + ACTIONS(303), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, anon_sym_LF, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1410] = 2, + ACTIONS(277), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [359] = 1, - ACTIONS(123), 7, - sym_word, + ACTIONS(275), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, anon_sym_LF, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1430] = 2, + ACTIONS(301), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [369] = 1, - ACTIONS(129), 7, - sym_word, + ACTIONS(299), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, anon_sym_LF, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1450] = 2, + ACTIONS(273), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [379] = 1, - ACTIONS(139), 7, - sym_word, + ACTIONS(271), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, anon_sym_LF, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1470] = 2, + ACTIONS(289), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, - anon_sym_BQUOTE, anon_sym_LBRACE, - [389] = 1, - ACTIONS(137), 7, - sym_word, + ACTIONS(287), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, anon_sym_LF, anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1490] = 2, + ACTIONS(285), 6, + aux_sym_word_token1, + aux_sym_word_token2, anon_sym_SQUOTE, + aux_sym_word_token8, anon_sym_PIPE, + anon_sym_LBRACE, + ACTIONS(283), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + anon_sym_LF, + anon_sym_STAR, + sym_url_word, anon_sym_BQUOTE, + [1510] = 2, + ACTIONS(281), 6, + aux_sym_word_token1, + aux_sym_word_token2, + anon_sym_SQUOTE, + aux_sym_word_token8, + anon_sym_PIPE, anon_sym_LBRACE, - [399] = 3, - ACTIONS(143), 1, + ACTIONS(279), 9, + ts_builtin_sym_end, + aux_sym_word_token3, + aux_sym_word_token4, + aux_sym_word_token7, + aux_sym_word_token9, + anon_sym_LF, + anon_sym_STAR, + sym_url_word, + anon_sym_BQUOTE, + [1530] = 4, + ACTIONS(123), 1, + aux_sym_column_heading_token1, + ACTIONS(125), 1, anon_sym_STAR, - ACTIONS(159), 1, + ACTIONS(307), 1, anon_sym_LF, - STATE(40), 1, + STATE(63), 2, sym_tag, - [409] = 1, - ACTIONS(123), 2, + aux_sym_h3_repeat1, + [1544] = 4, + ACTIONS(309), 1, + aux_sym_codeblock_token2, + ACTIONS(311), 1, anon_sym_LF, - anon_sym_STAR2, - [414] = 1, - ACTIONS(161), 1, - anon_sym_STAR2, - [418] = 1, - ACTIONS(163), 1, - anon_sym_PIPE2, - [422] = 1, - ACTIONS(165), 1, - anon_sym_RBRACE, - [426] = 1, - ACTIONS(167), 1, - anon_sym_BQUOTE2, - [430] = 1, - ACTIONS(169), 1, + ACTIONS(314), 1, + aux_sym_line_code_token1, + STATE(57), 2, + sym_line_code, + aux_sym_codeblock_repeat1, + [1558] = 3, + ACTIONS(319), 1, + aux_sym_uppercase_name_token2, + STATE(60), 1, + aux_sym_uppercase_name_repeat1, + ACTIONS(317), 3, + anon_sym_LF, + aux_sym_column_heading_token1, + anon_sym_STAR, + [1570] = 4, + ACTIONS(321), 1, + aux_sym_codeblock_token2, + ACTIONS(323), 1, + anon_sym_LF, + ACTIONS(325), 1, + aux_sym_line_code_token1, + STATE(57), 2, + sym_line_code, + aux_sym_codeblock_repeat1, + [1584] = 3, + ACTIONS(329), 1, + aux_sym_uppercase_name_token2, + STATE(60), 1, + aux_sym_uppercase_name_repeat1, + ACTIONS(327), 3, + anon_sym_LF, + aux_sym_column_heading_token1, + anon_sym_STAR, + [1596] = 3, + ACTIONS(334), 1, + aux_sym_uppercase_name_token2, + STATE(58), 1, + aux_sym_uppercase_name_repeat1, + ACTIONS(332), 3, + anon_sym_LF, + aux_sym_column_heading_token1, + anon_sym_STAR, + [1608] = 3, + ACTIONS(323), 1, + anon_sym_LF, + ACTIONS(325), 1, + aux_sym_line_code_token1, + STATE(59), 2, + sym_line_code, + aux_sym_codeblock_repeat1, + [1619] = 3, + ACTIONS(125), 1, + anon_sym_STAR, + ACTIONS(336), 1, + anon_sym_LF, + STATE(64), 2, + sym_tag, + aux_sym_h3_repeat1, + [1630] = 3, + ACTIONS(338), 1, + anon_sym_LF, + ACTIONS(340), 1, + anon_sym_STAR, + STATE(64), 2, + sym_tag, + aux_sym_h3_repeat1, + [1641] = 2, + ACTIONS(345), 1, + anon_sym_LF, + ACTIONS(343), 2, + aux_sym_codeblock_token2, + aux_sym_line_code_token1, + [1649] = 3, + ACTIONS(347), 1, + aux_sym_word_token5, + ACTIONS(349), 1, + aux_sym_word_token6, + ACTIONS(351), 1, + aux_sym_optionlink_token1, + [1659] = 3, + ACTIONS(353), 1, + aux_sym_word_token5, + ACTIONS(355), 1, + aux_sym_word_token6, + ACTIONS(357), 1, + aux_sym_optionlink_token1, + [1669] = 2, + ACTIONS(361), 1, + anon_sym_LF, + ACTIONS(359), 2, + aux_sym_codeblock_token2, + aux_sym_line_code_token1, + [1677] = 1, + ACTIONS(123), 1, + aux_sym_column_heading_token1, + [1681] = 1, + ACTIONS(363), 1, + ts_builtin_sym_end, + [1685] = 1, + ACTIONS(365), 1, + aux_sym_tag_token1, + [1689] = 1, + ACTIONS(367), 1, + anon_sym_SQUOTE2, + [1693] = 1, + ACTIONS(369), 1, anon_sym_PIPE2, - [434] = 1, - ACTIONS(171), 1, + [1697] = 1, + ACTIONS(371), 1, anon_sym_SQUOTE2, - [438] = 1, - ACTIONS(129), 1, - anon_sym_STAR2, - [442] = 1, - ACTIONS(139), 1, - anon_sym_STAR2, - [446] = 1, - ACTIONS(121), 1, - anon_sym_STAR2, - [450] = 1, - ACTIONS(137), 1, - anon_sym_STAR2, - [454] = 1, - ACTIONS(173), 1, - anon_sym_LF, - [458] = 1, - ACTIONS(175), 1, + [1701] = 1, + ACTIONS(33), 1, ts_builtin_sym_end, - [462] = 1, - ACTIONS(177), 1, - sym_word, - [466] = 1, - ACTIONS(179), 1, - sym__imm_word, - [470] = 1, - ACTIONS(181), 1, - sym__imm_word, - [474] = 1, - ACTIONS(183), 1, + [1705] = 1, + ACTIONS(373), 1, + ts_builtin_sym_end, + [1709] = 1, + ACTIONS(375), 1, anon_sym_STAR2, - [478] = 1, - ACTIONS(185), 1, - anon_sym_SQUOTE2, - [482] = 1, - ACTIONS(159), 1, - anon_sym_LF, - [486] = 1, - ACTIONS(187), 1, - anon_sym_BQUOTE2, - [490] = 1, - ACTIONS(189), 1, + [1713] = 1, + ACTIONS(377), 1, + aux_sym_codespan_token1, + [1717] = 1, + ACTIONS(379), 1, + aux_sym_argument_token1, + [1721] = 1, + ACTIONS(381), 1, + ts_builtin_sym_end, + [1725] = 1, + ACTIONS(383), 1, + ts_builtin_sym_end, + [1729] = 1, + ACTIONS(385), 1, + aux_sym_line_code_token2, + [1733] = 1, + ACTIONS(37), 1, + ts_builtin_sym_end, + [1737] = 1, + ACTIONS(387), 1, anon_sym_RBRACE, - [494] = 1, - ACTIONS(191), 1, - anon_sym_STAR2, - [498] = 1, - ACTIONS(193), 1, + [1741] = 1, + ACTIONS(389), 1, + anon_sym_BQUOTE2, + [1745] = 1, + ACTIONS(391), 1, anon_sym_SQUOTE2, - [502] = 1, - ACTIONS(195), 1, + [1749] = 1, + ACTIONS(393), 1, + anon_sym_SQUOTE2, + [1753] = 1, + ACTIONS(395), 1, + anon_sym_STAR2, + [1757] = 1, + ACTIONS(397), 1, anon_sym_PIPE2, - [506] = 1, - ACTIONS(197), 1, + [1761] = 1, + ACTIONS(399), 1, anon_sym_BQUOTE2, - [510] = 1, - ACTIONS(199), 1, + [1765] = 1, + ACTIONS(401), 1, anon_sym_RBRACE, - [514] = 1, - ACTIONS(201), 1, - sym__imm_word, - [518] = 1, - ACTIONS(203), 1, - sym__imm_word, - [522] = 1, - ACTIONS(205), 1, - sym__imm_word, - [526] = 1, - ACTIONS(207), 1, - sym__imm_word, - [530] = 1, - ACTIONS(209), 1, - sym_word, - [534] = 1, - ACTIONS(211), 1, - anon_sym_LF, - [538] = 1, - ACTIONS(213), 1, - sym__imm_word, - [542] = 1, - ACTIONS(215), 1, - sym__imm_word, - [546] = 1, - ACTIONS(217), 1, - sym__imm_word, - [550] = 1, - ACTIONS(219), 1, - sym_word, + [1769] = 1, + ACTIONS(403), 1, + aux_sym_taglink_token1, + [1773] = 1, + ACTIONS(405), 1, + aux_sym_tag_token1, + [1777] = 1, + ACTIONS(407), 1, + aux_sym_taglink_token1, + [1781] = 1, + ACTIONS(409), 1, + aux_sym_codespan_token1, + [1785] = 1, + ACTIONS(411), 1, + aux_sym_argument_token1, }; static const uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(6)] = 0, - [SMALL_STATE(7)] = 31, - [SMALL_STATE(8)] = 62, - [SMALL_STATE(9)] = 90, - [SMALL_STATE(10)] = 106, - [SMALL_STATE(11)] = 122, - [SMALL_STATE(12)] = 138, - [SMALL_STATE(13)] = 154, - [SMALL_STATE(14)] = 170, - [SMALL_STATE(15)] = 186, - [SMALL_STATE(16)] = 202, - [SMALL_STATE(17)] = 218, - [SMALL_STATE(18)] = 234, - [SMALL_STATE(19)] = 250, - [SMALL_STATE(20)] = 268, - [SMALL_STATE(21)] = 295, - [SMALL_STATE(22)] = 322, - [SMALL_STATE(23)] = 349, - [SMALL_STATE(24)] = 359, - [SMALL_STATE(25)] = 369, - [SMALL_STATE(26)] = 379, - [SMALL_STATE(27)] = 389, - [SMALL_STATE(28)] = 399, - [SMALL_STATE(29)] = 409, - [SMALL_STATE(30)] = 414, - [SMALL_STATE(31)] = 418, - [SMALL_STATE(32)] = 422, - [SMALL_STATE(33)] = 426, - [SMALL_STATE(34)] = 430, - [SMALL_STATE(35)] = 434, - [SMALL_STATE(36)] = 438, - [SMALL_STATE(37)] = 442, - [SMALL_STATE(38)] = 446, - [SMALL_STATE(39)] = 450, - [SMALL_STATE(40)] = 454, - [SMALL_STATE(41)] = 458, - [SMALL_STATE(42)] = 462, - [SMALL_STATE(43)] = 466, - [SMALL_STATE(44)] = 470, - [SMALL_STATE(45)] = 474, - [SMALL_STATE(46)] = 478, - [SMALL_STATE(47)] = 482, - [SMALL_STATE(48)] = 486, - [SMALL_STATE(49)] = 490, - [SMALL_STATE(50)] = 494, - [SMALL_STATE(51)] = 498, - [SMALL_STATE(52)] = 502, - [SMALL_STATE(53)] = 506, - [SMALL_STATE(54)] = 510, - [SMALL_STATE(55)] = 514, - [SMALL_STATE(56)] = 518, - [SMALL_STATE(57)] = 522, - [SMALL_STATE(58)] = 526, - [SMALL_STATE(59)] = 530, - [SMALL_STATE(60)] = 534, - [SMALL_STATE(61)] = 538, - [SMALL_STATE(62)] = 542, - [SMALL_STATE(63)] = 546, - [SMALL_STATE(64)] = 550, + [SMALL_STATE(7)] = 0, + [SMALL_STATE(8)] = 68, + [SMALL_STATE(9)] = 133, + [SMALL_STATE(10)] = 189, + [SMALL_STATE(11)] = 242, + [SMALL_STATE(12)] = 289, + [SMALL_STATE(13)] = 334, + [SMALL_STATE(14)] = 381, + [SMALL_STATE(15)] = 425, + [SMALL_STATE(16)] = 469, + [SMALL_STATE(17)] = 513, + [SMALL_STATE(18)] = 554, + [SMALL_STATE(19)] = 595, + [SMALL_STATE(20)] = 636, + [SMALL_STATE(21)] = 677, + [SMALL_STATE(22)] = 707, + [SMALL_STATE(23)] = 737, + [SMALL_STATE(24)] = 767, + [SMALL_STATE(25)] = 797, + [SMALL_STATE(26)] = 827, + [SMALL_STATE(27)] = 857, + [SMALL_STATE(28)] = 887, + [SMALL_STATE(29)] = 917, + [SMALL_STATE(30)] = 947, + [SMALL_STATE(31)] = 977, + [SMALL_STATE(32)] = 1007, + [SMALL_STATE(33)] = 1032, + [SMALL_STATE(34)] = 1055, + [SMALL_STATE(35)] = 1080, + [SMALL_STATE(36)] = 1103, + [SMALL_STATE(37)] = 1128, + [SMALL_STATE(38)] = 1150, + [SMALL_STATE(39)] = 1172, + [SMALL_STATE(40)] = 1194, + [SMALL_STATE(41)] = 1216, + [SMALL_STATE(42)] = 1238, + [SMALL_STATE(43)] = 1260, + [SMALL_STATE(44)] = 1282, + [SMALL_STATE(45)] = 1304, + [SMALL_STATE(46)] = 1326, + [SMALL_STATE(47)] = 1348, + [SMALL_STATE(48)] = 1370, + [SMALL_STATE(49)] = 1390, + [SMALL_STATE(50)] = 1410, + [SMALL_STATE(51)] = 1430, + [SMALL_STATE(52)] = 1450, + [SMALL_STATE(53)] = 1470, + [SMALL_STATE(54)] = 1490, + [SMALL_STATE(55)] = 1510, + [SMALL_STATE(56)] = 1530, + [SMALL_STATE(57)] = 1544, + [SMALL_STATE(58)] = 1558, + [SMALL_STATE(59)] = 1570, + [SMALL_STATE(60)] = 1584, + [SMALL_STATE(61)] = 1596, + [SMALL_STATE(62)] = 1608, + [SMALL_STATE(63)] = 1619, + [SMALL_STATE(64)] = 1630, + [SMALL_STATE(65)] = 1641, + [SMALL_STATE(66)] = 1649, + [SMALL_STATE(67)] = 1659, + [SMALL_STATE(68)] = 1669, + [SMALL_STATE(69)] = 1677, + [SMALL_STATE(70)] = 1681, + [SMALL_STATE(71)] = 1685, + [SMALL_STATE(72)] = 1689, + [SMALL_STATE(73)] = 1693, + [SMALL_STATE(74)] = 1697, + [SMALL_STATE(75)] = 1701, + [SMALL_STATE(76)] = 1705, + [SMALL_STATE(77)] = 1709, + [SMALL_STATE(78)] = 1713, + [SMALL_STATE(79)] = 1717, + [SMALL_STATE(80)] = 1721, + [SMALL_STATE(81)] = 1725, + [SMALL_STATE(82)] = 1729, + [SMALL_STATE(83)] = 1733, + [SMALL_STATE(84)] = 1737, + [SMALL_STATE(85)] = 1741, + [SMALL_STATE(86)] = 1745, + [SMALL_STATE(87)] = 1749, + [SMALL_STATE(88)] = 1753, + [SMALL_STATE(89)] = 1757, + [SMALL_STATE(90)] = 1761, + [SMALL_STATE(91)] = 1765, + [SMALL_STATE(92)] = 1769, + [SMALL_STATE(93)] = 1773, + [SMALL_STATE(94)] = 1777, + [SMALL_STATE(95)] = 1781, + [SMALL_STATE(96)] = 1785, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [23] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_help_file, 1), - [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), - [29] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(3), - [32] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(60), - [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(21), - [38] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(55), - [41] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(44), - [44] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(43), - [47] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(42), - [50] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(5), - [53] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(47), - [56] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(28), - [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), - [61] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(21), - [64] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(55), - [67] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(44), - [70] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(43), - [73] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(42), - [76] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(4), - [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line, 1), - [81] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [87] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(20), - [90] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(61), - [93] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(62), - [96] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(63), - [99] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(64), - [102] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_headline_repeat1, 2), SHIFT_REPEAT(6), - [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [121] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_backtick, 3, .production_id = 4), - [123] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tag, 3, .production_id = 2), - [125] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_heading, 3, .production_id = 1), - [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_heading, 2, .production_id = 1), - [129] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_option, 3, .production_id = 2), - [131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line, 2), - [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_headline, 4, .production_id = 5), - [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line, 3), - [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument, 3, .production_id = 2), - [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hotlink, 3, .production_id = 3), - [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [175] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [181] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_help_file, 0), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(92), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), + [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_help_file, 1), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_help_file, 2), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), + [41] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(44), + [44] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(44), + [47] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(66), + [50] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(62), + [53] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(19), + [56] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(18), + [59] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(20), + [62] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(61), + [65] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(71), + [68] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(46), + [71] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(92), + [74] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(78), + [77] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_help_file_repeat2, 2), SHIFT_REPEAT(79), + [80] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [82] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), + [86] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(44), + [89] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(44), + [92] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(66), + [95] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(62), + [98] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(19), + [101] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(61), + [104] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(71), + [107] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(46), + [110] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(92), + [113] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(78), + [116] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(79), + [119] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_noeol, 1), + [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [129] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), + [131] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(44), + [134] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(44), + [137] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(66), + [140] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(71), + [143] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(46), + [146] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(92), + [149] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(78), + [152] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(79), + [155] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(48), + [158] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(48), + [161] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(67), + [164] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(93), + [167] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(49), + [170] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(94), + [173] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(95), + [176] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_line_repeat1, 2), SHIFT_REPEAT(96), + [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_li_noeol, 2), + [181] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [185] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [193] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), + [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [197] = {.entry = {.count = 1, .reusable = false}}, SHIFT(96), [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_h1, 4, .production_id = 5), + [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_h1, 4, .production_id = 5), + [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_h3, 4, .production_id = 2), + [209] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_h3, 4, .production_id = 2), + [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_h2, 4, .production_id = 5), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_h2, 4, .production_id = 5), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat2, 2), + [217] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat2, 2), SHIFT_REPEAT(32), + [220] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_block_repeat2, 2), + [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_h3, 3, .production_id = 2), + [224] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_h3, 3, .production_id = 2), + [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_h2, 3, .production_id = 5), + [228] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_h2, 3, .production_id = 5), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_h1, 3, .production_id = 5), + [232] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_h1, 3, .production_id = 5), + [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2), + [236] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 2), + [238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), + [240] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_help_file_repeat1, 2), SHIFT_REPEAT(30), + [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_help_file_repeat1, 2), + [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_h3, 2, .production_id = 2), + [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_h3, 2, .production_id = 2), + [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat2, 1, .production_id = 3), + [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_block_repeat2, 1, .production_id = 3), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_heading, 2, .production_id = 2), + [255] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_heading, 2, .production_id = 2), + [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line, 1), + [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_line, 1), + [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_codeblock, 3), + [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_codeblock, 3), + [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_noeol, 2), + [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line, 2), + [269] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_line, 2), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tag, 3, .production_id = 4), + [273] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tag, 3, .production_id = 4), + [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_word, 3), + [277] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_word, 3), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument, 3, .production_id = 4), + [281] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument, 3, .production_id = 4), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_codespan, 3, .production_id = 4), + [285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_codespan, 3, .production_id = 4), + [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_taglink, 3, .production_id = 4), + [289] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_taglink, 3, .production_id = 4), + [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_li, 3), + [293] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_line_li, 3), + [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_word, 1), + [297] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_word, 1), + [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_optionlink, 3, .production_id = 4), + [301] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_optionlink, 3, .production_id = 4), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_url, 1, .production_id = 1), + [305] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_url, 1, .production_id = 1), + [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_codeblock_repeat1, 2), + [311] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_codeblock_repeat1, 2), SHIFT_REPEAT(68), + [314] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_codeblock_repeat1, 2), SHIFT_REPEAT(82), + [317] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_uppercase_name, 2), + [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [323] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [327] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_uppercase_name_repeat1, 2), + [329] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_uppercase_name_repeat1, 2), SHIFT_REPEAT(60), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_uppercase_name, 1), + [334] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [336] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_h3_repeat1, 2), + [340] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_h3_repeat1, 2), SHIFT_REPEAT(71), + [343] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_code, 2), + [345] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_line_code, 2), + [347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [349] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), + [351] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), + [353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [355] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), + [357] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87), + [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_code, 1), + [361] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_line_code, 1), + [363] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [373] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block_end, 1), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_help_file, 3), + [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block_end, 2), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), }; #ifdef __cplusplus extern "C" { #endif -void *tree_sitter_help_external_scanner_create(void); -void tree_sitter_help_external_scanner_destroy(void *); -bool tree_sitter_help_external_scanner_scan(void *, TSLexer *, const bool *); -unsigned tree_sitter_help_external_scanner_serialize(void *, char *); -void tree_sitter_help_external_scanner_deserialize(void *, const char *, unsigned); - #ifdef _WIN32 #define extern __declspec(dllexport) #endif @@ -1409,15 +3837,6 @@ extern const TSLanguage *tree_sitter_help(void) { .alias_sequences = &ts_alias_sequences[0][0], .lex_modes = ts_lex_modes, .lex_fn = ts_lex, - .external_scanner = { - &ts_external_scanner_states[0][0], - ts_external_scanner_symbol_map, - tree_sitter_help_external_scanner_create, - tree_sitter_help_external_scanner_destroy, - tree_sitter_help_external_scanner_scan, - tree_sitter_help_external_scanner_serialize, - tree_sitter_help_external_scanner_deserialize, - }, .primary_state_ids = ts_primary_state_ids, }; return &language; diff --git a/src/scanner.c b/src/scanner.c deleted file mode 100644 index 7bcf6a1..0000000 --- a/src/scanner.c +++ /dev/null @@ -1,162 +0,0 @@ -#include "stdio.h" -#include "stdlib.h" -#include -#include -#include -#include -#include - -enum TokenType { - WORD, - IMM_WORD, - COLUMN_HEADING, - UPPERCASE_NAME, - CODE_BLOCK, - TOKENTYPE_NR -}; - -void *tree_sitter_help_external_scanner_create() { return NULL; } - -unsigned int tree_sitter_help_external_scanner_serialize(void *payload, - char *buffer) { - return 0; -} - -void tree_sitter_help_external_scanner_destroy(void *payload) {} -void tree_sitter_help_external_scanner_deserialize(void *payload, - const char *buffer, - unsigned length) {} - -static void advance(TSLexer *lexer, bool skip) { lexer->advance(lexer, skip); } - -void skip_space_tabs(TSLexer *lexer) { - while (lexer->lookahead == ' ' || lexer->lookahead == '\t') { - advance(lexer, true); - } -} - -#define IS_SPECIAL(c) \ - ((c) == '*' || (c) == '|' || (c) == '`' || (c) == '\'' || (c) == '{' || \ - (c) == '}') - -bool tree_sitter_help_external_scanner_scan(void *payload, TSLexer *lexer, - const bool *valid_symbols) { - if (!valid_symbols[IMM_WORD]) { - skip_space_tabs(lexer); - } else { - if (iswspace(lexer->lookahead)) { - return false; - } - } - if (lexer->lookahead == '\0' || lexer->lookahead == EOF || - lexer->lookahead == '\n') { - return false; - } - - if (lexer->get_column(lexer) == 0 && - (lexer->lookahead == '-' || lexer->lookahead == '=')) { - return false; - } - - if (valid_symbols[COLUMN_HEADING] && iswalpha(lexer->lookahead) && - lexer->get_column(lexer) == 0) { - assert(valid_symbols[WORD] && valid_symbols[UPPERCASE_NAME]); - advance(lexer, false); - - bool all_uppercase = true; - - // Now consume a word, without the ending ~ if any - while (!iswspace(lexer->lookahead) && lexer->lookahead != '\0' && - lexer->lookahead != '~') { - if (all_uppercase && iswlower(lexer->lookahead)) { - all_uppercase = false; - } - advance(lexer, false); - } - - // Tricky: we will move forward until we find a ~ - // If we find it before a `\n` and it is followed `\n` - // then its a column heading. - // Otherwise it's either a word or an UPPERCASE column heading - lexer->mark_end(lexer); - - while (lexer->lookahead != '*' && lexer->lookahead != '~' && - lexer->lookahead != '\n' && lexer->lookahead != '\0') { - if (all_uppercase && iswlower(lexer->lookahead)) { - all_uppercase = false; - } - advance(lexer, false); - } - - if (lexer->lookahead == '~') { - advance(lexer, false); - all_uppercase = false; - if (lexer->lookahead == '\n') { - // Matched a column heading - lexer->mark_end(lexer); - advance(lexer, false); - lexer->result_symbol = COLUMN_HEADING; - return true; - } - } - - if (all_uppercase) { - lexer->mark_end(lexer); - lexer->result_symbol = UPPERCASE_NAME; - } else { - lexer->result_symbol = WORD; - } - return true; - } else if (valid_symbols[CODE_BLOCK] && lexer->lookahead == '>') { - advance(lexer, false); - - if (lexer->lookahead == '\n') { - advance(lexer, false); - } else { - return false; - } - - while (lexer->lookahead != '\0') { - // Match lines one by one - - if (!iswspace(lexer->lookahead)) { - if (lexer->lookahead == '<') { - advance(lexer, false); - } - lexer->result_symbol = CODE_BLOCK; - return true; - } - while (lexer->lookahead != '\n') { - advance(lexer, false); - } - advance(lexer, false); - } - } else if ((valid_symbols[WORD] || valid_symbols[IMM_WORD]) && - !IS_SPECIAL(lexer->lookahead)) { - TSSymbol result = valid_symbols[IMM_WORD] ? IMM_WORD : WORD; - advance(lexer, false); // We are sure this is part of the word - while (lexer->lookahead && !iswspace(lexer->lookahead)) { - if (IS_SPECIAL(lexer->lookahead)) { - lexer->mark_end(lexer); - advance(lexer, false); - - if (iswspace(lexer->lookahead) || iswpunct(lexer->lookahead) || - !lexer->lookahead) { - // Indeed this is an end marker, lex the word and return - lexer->result_symbol = result; - return true; - } - // Otherwise continue searching, this is not an end marker - continue; - } - // If we come here, the character is a part of the word - advance(lexer, false); - } - lexer->mark_end(lexer); - lexer->result_symbol = result; - return true; - } - return false; -} - -// vim: tabstop=2