The Quail is a general-purpose, multiparadigmal, object-oriented, interpretable programming language driven by Java 8, developed by single developer and oriented to be simple and friendly for new developers as well as for experienced programmers moving from other language.
quail run prog.q
and
java -jar quail.jar run prog.q
. From here and after quail
and java -jar path_to_your_quail.jar
are interchangeable.Specification is split into chapters:
A brief introduction
Contains general information, organization of specification, a couple of “Hello, World!” programs and contact info.
Grammar and execution flow
Contains grammar definition arranged in block-schemas.
Describes execution flow.
Preprocessing
Describes the work of preprocessor.
Lexical analysis
Describes the work of lexical analyser.
Parsing
Describes type of nodes and the work of parser.
Typing and classes
Describes Quail’s type and OOP system
Memory system
Describes how memory and scopes in Quail work.
Statement executions
Describes how statements and expressions are executed in Quail.
External Libraries
Describes how external libraries in Quail are imported.
Exceptions and errors
Describes how exceptions and errors are raised and handled.
Standard library
Describes Quail’s standard library
Console operation
Describes how you should operate Quail in terminal
Documentation
Describes inbuilt documentation engine
Debugger
Describes debugger protocol, usage of debugger and how it works in general
QRE and QDK
Contains information about QRE and QDK
Hello, World!:
print("Hello, World!")
Looping factorial:
function fact(x) {
n = 1
through 1:+x as i
n *= i
return n
}
print(fact(5))
Recursive factorial:
function fact(x) {
if x >= 1
return x * fact(x - 1)
else
return 1
}
print(fact(5))
One-liner factorial:
use "lang/math" = math
function fact(x) math.product(1:+x)
print(fact(5))
For reporting any bugs please use Issues · Quail-Language/quail · GitHub
If you want to ask a question, write to our Discord server, or to email: dev.quail.lang@gmail.com
Keep in mind that Quail is still in development, so if you spot a bug, a variance in Documentation/Specification or if you have a great idea about improving Quail, you are very welcome to one of the above written locations.