file extension

The recommended file extension is .langur.

source code

Langur source code is always UTF-8. Anything else would be uncivilized (see UTF-8 Everywhere). A BOM (code point FEFF) is not allowed. At least some Linux shells (maybe all?) would miss a shebang line if a BOM were present.

Token whitespace allowed is the horizontal tab (9), space (16x20), and line feed (16x0A).

Note that using Windows line returns (CR/LF combination) in langur source code was removed as of 0.7, in favor of Linux line endings (LF only), which most operating systems use, anyway. Any decent plain text editor will allow you to specify the type of line endings to use. On Windows, I found Notepad++ useful, and there are plenty of others, I'm sure. Notepad, which comes with Windows, is not useful in this regard, and will not break at a line feed.

Identifiers are ASCII only. Allowing just anything for identifiers has too much potential for confusion.


Use a shebang line at the very start of the file to specify the interpreter to use, such as...

#! /usr/bin/langur


Langur has 2 types of comments, single-line comments and multi-line (or inline) comments.

# single-line comment started with hash mark /* multi-line (or inline) comment enclosed in C-style markers */

Comments allow characters designated as "Graphic" by Unicode, Spaces, and Private Use Area code points. Also, the following list of invisible "spaces," to make it easier to paste in international text. The idea around the "allowed" characters is to keep source code from having hidden text or codes and to allay confusion and deception. There may be more code points that need to be allowed.

invisible "spaces" list

0.8.8 adds some that were missing from previous releases.

command line options

Linux Windows
-e "script" /e "script"
execute command-line script instead of a file
--help /?
help: print command line options
-W0123 /W0123
warn on number literals starting with 0 so they're not confused for base 8 literals as used in many languages

In langur, a base 8 literal is prefixed with 8x, such as 8x123 (NOT 0123).
-w0123 /w0123
disable this warning
-Wlookalike /Wlookalike
warn on lookalike variables within scope
A lowercase L and a number 1 might appear identical.
-wlookalike /wlookalike
disable this warning