You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LOLCODE spec: syntax and formatting gaps (items 15-20) #160
Found while marking the LOLCODE assignment (Fall 2026, 36 submissions). The quoted text is from lolcode/ and info/ on master.
Each item can be fixed and ticked off separately.
15. Whitespace inside multi-word keywords
spec/formatting.rst says "Spaces are used to demarcate tokens in the language, although some keyword constructs may include spaces" and "Multiple spaces and tabs are treated as single spaces and are otherwise irrelevant." Read together, I HAS A x or SUM<tab>OF is valid, but no example anywhere in the LOLCODE pages puts more than one space, or a tab, inside a multi-word keyword; the only doubled spaces are between tokens (HAI BTW ..., padding before a trailing BTW). 16 students wrote single-space lexer literals such as 'I HAS A', and these cost up to 10 grammar marks, so a student could reasonably argue the spec never showed the case.
Proposed fix: say explicitly that any run of spaces/tabs may separate the words of a multi-word keyword, and add an example such as I HAS A x ITZ SUM OF 1 AN 2 to Formatting.
16. Where commas may appear around block keywords
Examples show BOTH SAEM ..., O RLY?, YA RLY, VISIBLE ... and O RLY? on its own line, but not OIC, VISIBLE "b", x newline WTF?, or blank lines between O RLY? and YA RLY. Students rejected each of these.
Proposed fix: a short rule ("any statement terminator, including a run of newlines/commas, may appear between block keywords").
17. ! and SMOOSH
Is ! part of the last token or a separate token ("a"! vs "a" !)? Does ! close an open SMOOSH without MKAY (VISIBLE SMOOSH "a" AN "b"!)? Several parsers throw.
Proposed fix: one example.
18. Comments next to separators and at end of file
"Soft-command-breaks (,) after the comment (BTW) are ignored": does BTW,x (no space) start a comment? Is KTHXBYE BTW done with no trailing newline valid? Is a trailing newline after KTHXBYE required?
Proposed fix: state that a file may end without a newline and that BTW starts a comment wherever it appears as a word.
19. Loop label matching
"the <label> is required, but is unused". Must the IM OUTTA YR label match?
Proposed fix: say yes or no.
20. Iterated loops
The section describes UPPIN/NERFIN/TIL/WILE fully, then a note says they are not required.
Proposed fix: move them to a clearly optional box, and say tests will not use them.
Activity