lorddimwit, #AppleScript grammar is sorta specified in the AppleScript Language Guide but not formally.
Does anyone know if there’s a formal grammar specification for any version of AppleScript? The paper from Cook et al has a fragment of a formal grammar.
The way tokenization works with multi word commands and dictionary-specified constants and such seems relatively straightforward (basically dynamically modify the set of keywords inside tell blocks, greedily tokenize heads).
Add comment