Skip to content

cordx56/silang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SILang

SILang - Simple Interpreter Language

大学の講義で作成したインタプリタの改善・拡張版。

元のプログラムはC++で書かれていたが、Rustで書き直した。

言語の試用はhttps://silang.cordx.net/から可能。

Run

Running interpreter

$ cargo run

Running file

$ cargo run file.sil

Language specification

BNF

<program>    := (<multispace>* <statement> <multispace>*)*
<block>      := "{" <multispace>* <program> <multispace>* "}"
<statement>  := <multispace>* expression <space>* "\n"
<expression> := <factor> (<space>+ <factor>)*
<factor>     := <string> | <number> | <identifier> ("[" <expression> "]")? | "(" <multispace>* <expression>? <multispace>* ")" | <block>

About

space-separated Simple Interpreter (toy) Language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages