Không có mô tả

Beoran 27222415ce Consider operators as part of a command chain. 5 năm trước cách đây
cmd 6c4c374381 Make EOF work slightly better in muesly command interpreter. 5 năm trước cách đây
test b19c0c32ae A few things work better now 5 năm trước cách đây
LICENSE 534d46d7c8 Add MIT LICENSE. 5 năm trước cách đây
README.md 27222415ce Consider operators as part of a command chain. 5 năm trước cách đây
alias.go 1a81159c54 Support operators, finally, if in a slightly roundabout way. Also support aliasing. 5 năm trước cách đây
ast.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
ast_test.go 969734636f Improve the lexer and work on the parser. 6 năm trước cách đây
block.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
bool.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
builtin.go 1a81159c54 Support operators, finally, if in a slightly roundabout way. Also support aliasing. 5 năm trước cách đây
callable.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
cover.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
defined.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
design_muesli.muesli 27222415ce Consider operators as part of a command chain. 5 năm trước cách đây
doc.go 5ffa4a6725 Lexer is still flaky, considering switching to state machine based lexer. 6 năm trước cách đây
door.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
empty.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
error.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
float.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
go.mod 5e6a17f72a Starting to become runnable. 5 năm trước cách đây
go.sum 5e6a17f72a Starting to become runnable. 5 năm trước cách đây
help.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
int.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
keyword.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
lexer.go 1a81159c54 Support operators, finally, if in a slightly roundabout way. Also support aliasing. 5 năm trước cách đây
lexer_test.go 433b2c57d0 Parser starts to work correctly. 6 năm trước cách đây
list.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
logger.go 433b2c57d0 Parser starts to work correctly. 6 năm trước cách đây
map.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
muesli.go 5ffa4a6725 Lexer is still flaky, considering switching to state machine based lexer. 6 năm trước cách đây
parser.go 27222415ce Consider operators as part of a command chain. 5 năm trước cách đây
parser_test.go 5e6a17f72a Starting to become runnable. 5 năm trước cách đây
redispatch.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
signature.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
string.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
token.go 07e59b880b Consider adding operators as commands. 5 năm trước cách đây
type.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
value.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây
vm.go 27222415ce Consider operators as part of a command chain. 5 năm trước cách đây
vm_test.go ad6c510461 WIP return or fail. 5 năm trước cách đây
word.go 027d3a2f29 Signatures for all callables. Think about type system. 5 năm trước cách đây

README.md

Muesli is a Multi Use Embeddable Scripting Language Implementation.

Introduction

Muesli is a scripting language implemented in Go, that has a simple command chain based TCL or shell like syntax but with rich semantics. Unlike TCL or shels, all muelsi values are typed, and many types are supported, not just string values. Additionaly, if so desired, every symbol used in the syntax can be replaced by a key word, leading to a native language programming feel.

Syntax

A Muesli program consists of blocks and/or chains, separated by newlines or periods. A chain consists of one or more commands, linked together by operators.

Blocks consist of chains grouped together in blocks between braces {}. The commands in a block are not executed immediately but stored.

A single chain can be placed in parenthesis (), where the return value of the chain will be subsituted. Lists are formed by placing their contents between brackets [].

Every command has a return value, which can be of any type, and not just a number like in most shells. Furthermore commands have input and output, which default to stdin and stdout, but can be redirected or reconfigured.

There are three types of commands, namely direct commands indirect commmands and literal commands. A direct command starts with a name, and is followed by any number of parameters. Parameters may be which may be blocks, parenthesis, lists, names or literals, or values. An indirect command starts with a substitution followed by parameters. A literal command is simply a numeric, string, boolean or nil literal that evaluates to itself.

The language itself has no control statements, such as if, or for, these are implemented as commands in stead.

Muesly supports several kinds of values, namely:

  • Integers
  • Floats
  • Strings between "double quotes"
  • The booleans !true and !false
  • The nil value !nil
  • Words, which are simple runs of alphanumercial characters starting with a lower case lettter, such as foo
  • Types which are runs of alphanumerical characters starting with an upper case letter, such as Foo.