Artifact
d38987489ab1d2958c88ff6764315ab6d0523e1cb695ba644e84876791757712:
- File
languages/doctools/tests/sf/result/var-ref-007
— part of check-in
[ea5192243e]
at
2018-08-21 23:51:07
on branch language-doctools
—
Brought part of the `mindt` example, and associated experiences into
the doctools example. Reworked the doctools grammar to properly handle
the special forms. Further reworked to give it a structure similar to
the `mindt` grammar.
Started updating the tests.
Oops! There is strong ambiguity in the innards of `tclword`, the G1
level sub-structuring of command arguments.
It happens because at G1 level we have invisible whitespace discards,
and so a text like `BBB CCC` can be parsed as two separate `unquoted`
arguments (good), or as a __single__ `unquoted` argument of two
elements (bad) because the spacing separating them went away at L0
level. Something similar happens in the definition for
`quoted`. `braced` is fine because it maps to a single unbroken
lexeme.
This needs more thought ... Currently I only see bringing the argument
spacing into the G1 as possible solution. The lexeme match would have
precedence over the discards. Oh, and `quoted` already has `space` as
element of the structure, so maybe it would not have the issue. That
would be similar to the special forms, they handle their inner
whitespace explicitly too, although in L0.
... A quick trial looks to be working ... Only forest remaining looks
to be `breaker` vs `space` in example blocks.
Fixed the ambiguity as well. Introduced non-breaking (nb) space, allow
only that in the example text. Use non-breaking simplex variants as
well to gather longer chunks of input.
This looks good. Tests all ok, and ASTs look good enough. I may
introduce the special action `::evens` however to drop unwanted spaces
in the `tclwords` sub-tree. Explicit removal of the separators.
Tests/examples for variable handling and includes have priority
tough. Also, get larger/real-world examples (Tcllib, Critcl, Kettle,
Kinetcl, etc).
(user:
andreask
size: 138)
[more...]
- File
languages/min-dt/tests/sf/result/var-ref-007
— part of check-in
[de9583426c]
at
2018-08-15 23:53:52
on branch mini-dt
— Created grammar for the special forms.
Testsuite for same.
(user:
andreask
size: 138)
var_ref
q_list
var_def
unquot
simple
@13 1 'a'
@{} {} ''
@15 1 'b'
simple
@17 1 'c'