Parsing Apple's HyperTalk language using xpeg.
Much learning from ex_pression grammar.
If available in Hex, the package can be installed
by adding hyperex to your list of dependencies in mix.exs:
def deps do
[
{:hyperex, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/hyperex.
The PEG parser is greedy. There was a bug in trying to parse this scriplet:
the english name of fieldVal
When the parser got to "fieldVal", it found a rule for identifying fields
and just gladly ate up the "field" part of the string. I inserted a
:^ (mandatory white space) in a few of the rules, just before the end
of the rule that had an opt. This also may require appending a space
character to the end of all scripts (or to the ends of each line in a
script).
When buttons and fields are layered on top of each other, mouse messages are sent only to the closest one. Background buttons and fields can never overlay those belonging to the card. Both background fields and card fields precede the card in the message-passing hierarchy even though the background itself comes after the card.