Up: [Notes](wiki?name=Notes)

# Reference

[Scanless
as of 2017-02-23

Found TODO: Check against my tables below.

# Comparison charts

[Adverb/User Comparison Chart](wiki?name=ACCC)

# Notes and questions

1. A close reading of `DSL.pod` is necessary to find that empty rules
   are considered to be a special case of an rhs alternative. See
   [Scanless DSL: empty

   IMHO this part needs an emphasis of some kind, as it makes reading
   the remainder of the document easier, whenever it talks about RHS
   alternatives.

   The role of quantified rules should be clarified too I believe. In
   some places I believe that an adverb applies to quantified rules
   as well, with this not explicitly stated (See "name", "action", "bless").

1. It should be noted that while some of the descriptions of adverbs
   and context cross-confirm each other, not all them do. I will use
   the marker __XREF__ whereever I put information into a table which
   came from the other description and is thus not cross-confirmed.

1. On another note, while the provided meta-grammer using a single set
   of rules for the adverbs, thus moving validation of their
   applicability past the parser, I see it as possible to give each
   context its own variant of `<adverb list>` which references only
   the allowed adverbs for that context. That way there is no need to
   validate past the parser, the grammar ensured it already. And this
   would be a third cross-check against the human-readable
   descriptions.

   Strongly tempted to make that happen here.

1. "The action adverb is allowed for An RHS alternative, in which the
   action is for the alternative."

   This feels incomplete. Nothing is said about quantified rules.
   While empty rules are not mentioned either

   Note also that it is explicitly specified to not be allowed for L0
   rules at all.

1. Technically it seems that rules with precedence are possible for
   L0.  It does not really make sense, as the structure of the
   matched lexeme will not be affected by this, but still.

   So, is the "assoc" adverb allowed in L0 priority rule/alternatives ?

1. Is the "name" adverb allowed for quantified rules ?

1. Nothing is said at all about where the "rank" adverb is allowed, or
   not.

# Adverbs

|Adverb		|Notes|
|---		|---|
|action		| [Scanless DSL: |
|association	| [Scanless DSL: |
|bless		| [Scanless DSL: |
|event		| [Scanless DSL: |
|latm		| [Scanless DSL: |
|name		| [Scanless DSL: |
|null-ranking	| [Scanless DSL: |
|pause		| [Scanless DSL: |
|priority	| [Scanless DSL: |
|proper		| [Scanless DSL: |
|rank		| [Scanless DSL: |
|separator	| [Scanless DSL: |

# Adverb contexts

|Context	|Notes|
|---		|---|
|\:default	| [Scanless DSL: |
|\:discard	| [Scanless DSL: |
|\:lexeme	| [Scanless DSL: |
|discard default| [Scanless DSL: discard |
|g1 alternative	| [Scanless DSL: |
|g1 empty rule	| [Scanless DSL: empty |
|g1 quant. rule	| [Scanless DSL: quantified |
|l0 alternative	| [Scanless DSL: |
|l0 empty rule	| [Scanless DSL: empty |
|l0 quant. rule	| [Scanless DSL: quantified |
|lexeme default	| [Scanless DSL: lexeme |

# Adverbs versus possible contexts

__Note__ that empty rules are not considered separately here due to
them being a special case of an RHS alternative. That makes the table
a bit shorter.

|Adverb		|Context	|Notes|
|---		|---		|---|
|action		|		| [Scanless DSL: |
|		|\:default	| __yes__ (__XREF__: G1)|
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	| __yes__ - Applies to the alternative|
|		|g1 quant. rule	| __XREF__: yes |
|		|l0 alternative	| __no__ |
|		|l0 quant. rule	| __no__ |
|		|lexeme default	| __yes__ - For all lexemes which do not specifically set their own|
||||
|association	|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	| __yes__ |
|		|g1 quant. rule	||
|		|l0 alternative	||
|		|l0 quant. rule	||
|		|lexeme default	||
||||
|bless		|   		| [Scanless DSL: |
|		|\:default	| __XREF__: yes, G1|
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	| __?__ __XREF__: yes |
|		|g1 quant. rule	| __?__ |
|		|l0 alternative	| __?__ |
|		|l0 quant. rule	| __?__ |
|		|lexeme default	| __XREF__: yes |
||||
|event		|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	| __XREF__: yes, discard event|
|		|\:lexeme	| __yes__ - Names the event for 'pause'. Error if 'pause' is missing. |
|		|discard default| __XREF__: yes|
|		|g1 alternative	||
|		|g1 quant. rule	||
|		|l0 alternative	||
|		|l0 quant. rule	||
|		|lexeme default	||
||||
|latm		|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	| __yes__ |
|		|discard default||
|		|g1 alternative	||
|		|g1 quant. rule	||
|		|l0 alternative	||
|		|l0 quant. rule	||
|		|lexeme default	| __yes__ |
||||
|name		|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	| __yes__ |
|		|g1 quant. rule	||
|		|l0 alternative	| __yes__ |
|		|l0 quant. rule	||
|		|lexeme default	||
||||
|null-ranking	|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	||
|		|g1 quant. rule	| __yes__ |
|		|l0 alternative	| __no__ |
|		|l0 quant. rule	| __no__ |
|		|lexeme default	||
||||
|pause		|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	| __yes__ - Declares a parse event. (Self: Warn if "event" is missing, unnamed events are strongly discouraged) |
|		|discard default||
|		|g1 alternative	||
|		|g1 quant. rule	||
|		|l0 alternative	||
|		|l0 quant. rule	||
|		|lexeme default	||
||||
|priority	|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	| __yes__ |
|		|discard default||
|		|g1 alternative	||
|		|g1 quant. rule	||
|		|l0 alternative	||
|		|l0 quant. rule	||
|		|lexeme default	||
||||
|proper		|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	||
|		|g1 quant. rule	| __yes__ - Ignored if there is no "separator". (Self: Add warning) |
|		|l0 alternative	||
|		|l0 quant. rule	| __yes__ - Ignored if there is no "separator". (Self: Add warning) |
|		|lexeme default	||
||||
|rank		|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	||
|		|g1 quant. rule	||
|		|l0 alternative	||
|		|l0 quant. rule	||
|		|lexeme default	||
||||
|separator	|   		| [Scanless DSL: |
|		|\:default	||
|		|\:discard	||
|		|\:lexeme	||
|		|discard default||
|		|g1 alternative	||
|		|g1 quant. rule	| __yes__ |
|		|l0 alternative	||
|		|l0 quant. rule	| __yes__ |
|		|lexeme default	||

# Possible contexts versus adverbs

|Context	|Adverb		|Notes|
|---		|---		|---|
|\:default	|		| [Scanless DSL: |
|		|action		| __yes__ - Affects G1 rules |
|		|association	||
|		|bless		| __yes__ - Affects G1 rules |
|		|event		||
|		|latm		||
|		|name		||
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||
||||
|\:discard	|		| [Scanless DSL: |
|		|action		||
|		|association	||
|		|bless		||
|		|event		| __yes__ - L0 - Implies a __pause__ (discard event only) |
|		|latm		||
|		|name		||
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||
||||
|\:lexeme	|		| [Scanless DSL: |
|		|action		||
|		|association	||
|		|bless		||
|		|event		| __yes__ - L0 - If specified, __pause__ has to be as well. Error if not |
|		|latm		| __XREF__: yes|
|		|name		||
|		|null-ranking	||
|		|pause		| __yes__ - L0 - If specified, __event__ should be as well. Unnamed events are discouraged |
|		|priority	| __yes__ |
|		|proper		||
|		|rank		||
|		|separator	||
||||
|discard default|		| [Scanless DSL: discard |
|		|action		||
|		|association	||
|		|bless		||
|		|event		| __yes__ |
|		|latm		||
|		|name		||
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||
||||
|g1 alternative	|		| [Scanless DSL: |
|		|action		| __yes__ |
|		|association	| __yes__ |
|		|bless		| __yes__ |
|		|event		||
|		|latm		||
|		|name		| __XREF__: yes|
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||
||||
|g1 empty rule	|		| [Scanless DSL: Empty |
|		|action		| __yes__ |
|		|association	| __XREF__: yes|
|		|bless		| __yes__ |
|		|event		||
|		|latm		||
|		|name		| __XREF__: yes|
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||
||||
|g1 quant. rule	|		| [Scanless DSL: |
|		|action		| __yes__ |
|		|association	||
|		|bless		| __yes__ |
|		|event		||
|		|latm		||
|		|name		||
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		| __yes__ |
|		|rank		||
|		|separator	| __yes__ |
||||
|l0 alternative	|		| [Scanless DSL: |
|		|action		| __XREF: no__|
|		|association	| yes__?__ |
|		|bless		||
|		|event		||
|		|latm		||
|		|name		| __XREF__: yes |
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||
||||
|l0 empty rule	|		| [Scanless DSL: Empty |
|		|action		| __XREF: no__|
|		|association	| yes__?__|
|		|bless		||
|		|event		||
|		|latm		||
|		|name		| __XREF__: yes |
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||
||||
|l0 quant. rule	|		| [Scanless DSL: |
|		|action		| __XREF: no__|
|		|association	||
|		|bless		||
|		|event		||
|		|latm		||
|		|name		||
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		| __yes__ |
|		|rank		||
|		|separator	| __yes__ |
||||
|lexeme default	|		| [Scanless DSL: lexeme |
|		|action		| __yes__ - L0 |
|		|association	||
|		|bless		| __yes__ - L0 |
|		|event		||
|		|latm		| __yes__ - L0 |
|		|name		||
|		|null-ranking	||
|		|pause		||
|		|priority	||
|		|proper		||
|		|rank		||
|		|separator	||