defano / wyldcard

A clone of Apple's HyperCard and HyperTalk scripting language.
https://github.com/defano/wyldcard/wiki
MIT License
117 stars 12 forks source link

"Statements" v. "Commands" - "addCmdStmnt" v. "answerDefaultCmd" ("stmnt" v. "cmd")? #71

Closed Jimw338 closed 5 years ago

Jimw338 commented 5 years ago

Is there a difference between "stmnt" and "cmd" for the labels after the "#" in the grammar? I see that "add" command is "addCmdStmnt", while the "answer" command family is "answer..Cmd". (And a few are "CmdStmnt") Does the name (the ending at least) itself make a difference to the ANTLR parser generation, or is it just an arbitrary label. Could I call a function (that returns something) a command (which doesn't) if I really wanted to?

defano commented 5 years ago

They're arbitrary. I'm not aware of any impact they have on the way Antlr generates the parser. You could call a function a command or just about anything else.

These inconsistencies are simply an artifact of a lack of good discipline on my part. ;)