nutmegc and nutmeg
Stephen Leach edited this page Dec 27, 2020
·
3 revisions
After you have installed Nutmeg, two new commands are available to you: nutmegc
and nutmeg
. These are the compiler and runner respectively. The typical way of using these commands looks like this:
nutmegc myprog.bundle file1.nutmeg file2.nutmeg # run the compiler to create the bundle file
nutmeg myprog.bundle # run the bundle file
The nutmeg
command can optionally be followed by a subcommand-option which may be one of the following. Note that the nutmegc
command is the same as nutmeg compile
and that nutmeg run
is the default.
-
nutmeg compile
- Compiles nutmeg files to produce a bundle-file. -
nutmeg help <subcommand>
- Prints out help for a subcommand or lists subcommands if none given. -
nutmeg run
- Runs a named bundle-file, the default. (Default: use this if there is no command-option.) -
nutmeg script
- Compiles nutmeg files into a temporary bundle-file and immediately runs it -
nutmeg unittest
- Runs the unit-tests contained by a bundle-file.
Nutmeg developers will also be interested in being able to run individual compiler phases using these less common subcommands:
-
nutmeg parse
- Parses nutmeg source code to generate a tree -
nutmeg resolve
- Annotates a tree with scope information -
nutmeg optimize
- Transforms a tree to improve performance -
nutmeg codegen
- Transforms a tree into back-end code -
nutmeg bundle
- Adds trees into the bundle file -
nutmeg trace
- Infers dependencies for entry-points
Design Principles
- Nutmeg Design Goals
- The Spirit of Nutmeg
- Syntax Design
- State Encapsulation
- List of Design Decisions
- Influences
Language Features
- $$-Syntax (Echo Expressions)
- Actors
- Allocators
- Annotations
- Assignments
- Bindings
- Blocks and Modifiers
- Brackets
- Capsules (Proposed)
- Clean Procedures
- Comments
- Copy by Snapshot
- Declarations
- Finesses
- For Syntax
- Futures
- Identifiers
- If Syntax
- Messages
- Pass Syntax
- Queries
- References
- Return Statements
- Sealing
- Semicolons
- Strings
- Switch Syntax
Built-in Libraries and Functions
Implementation
- Architecture in one page
- Autoconversion
- Bundle Files
- Code-Trees
- Compiler Pipeline
- Components of the Compiler
- Installation File Structure
- Mishaps
- Peekable Pushable Generators
- Recursive Descent Parser
- Resolver
- Walkthrough of Hello-World
How-Tos
Process