https://github.com/technius/selang
A simple programming language
https://github.com/technius/selang
Last synced: about 1 year ago
JSON representation
A simple programming language
- Host: GitHub
- URL: https://github.com/technius/selang
- Owner: Technius
- License: apache-2.0
- Created: 2018-02-07T19:52:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T06:31:33.000Z (about 8 years ago)
- Last Synced: 2025-01-31T12:24:44.954Z (over 1 year ago)
- Language: Haskell
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# Selang
This is a simple __S__-__E__xpression-based __Language__.
## Grammar
The concrete grammar of this language is specified using EBNF below:
```plain
whitespace ::= { " " } ;
digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
number ::= [ "-" ] digit { digit };
letter ::= "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l"
| "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x"
| "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J"
| "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V"
| "W" | "X" | "Y" | "Z" ;
character ::= letter | digit | "\'" | '\"' ;
string ::= '"' { character | whitespace } '"' ;
boolean ::= "true" | "false"
literal = string | number | boolean ;
identifier ::= letter { letter | digit } ;
atom := identifier | literal ;
list := "[" [ term { "," term } ] "]" ;
conditional := "if" term "then" term "else" term ;
term := atom | list | conditional ;
```
## Evaluation rules
TODO
```plain
```
## License
Copyright 2018 Bryan Tan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.