Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikooo777/funny
A java-based programming language
https://github.com/nikooo777/funny
Last synced: about 2 months ago
JSON representation
A java-based programming language
- Host: GitHub
- URL: https://github.com/nikooo777/funny
- Owner: nikooo777
- Created: 2015-10-23T09:39:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-15T09:47:51.000Z (almost 9 years ago)
- Last Synced: 2024-04-18T00:14:34.261Z (9 months ago)
- Language: Java
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Funny
A java-based programming language
#Grammar
program ::= function Eos .
function ::= "{" optParams optLocals optSequence "}" .
optParams ::= ( "(" optIds ")" )? .
optLocals ::= optIds .
optSequence ::= ( "->" sequence )? .
optIds::= ( id ( "," id )* )? .
id ::= Id .
sequence ::= optAssignment ( ";" optAssignment )* .
optAssignment := assignment? .
assignment ::= Id ( "=" | "+=" | "-=" | "*=" | "/=" | "%=" ) assignment
| logicalOr .
logicalOr ::= logicalAnd ( "||" logicalOr )? .
logicalAnd ::= equality ( "&&" logicalAnd )? .
equality ::= comparison ( ( "==" | "!=" ) comparison )? .
comparison ::= add ( ( "<" | "<=" | ">" | ">=" ) add )? .
add ::= mult ( ( "+" | "-" ) mult )* .
mult ::= unary ( ( "*" | "/" | "%" ) unary )* .
unary ::= ( "+" | "-" | "!" ) unary
| postfix .
postfix ::= primary args* .
args ::= "(" ( sequence ( "," sequence )* )? ")" .
primary ::= num | bool | nil | string
| getId
| function
| subsequence
| cond
| loop
| print .
num ::= Num .
bool ::= True | False .
nil ::= Nil .
string ::= String .
getId ::= Id .
subsequence ::= "(" sequence ")" .
cond ::= ( "if" | "ifnot" ) sequence "then" sequence ( "else" sequence )? "fi" .
loop ::= ( "while" | "whilenot" ) sequence ( "do" sequence )? "od" .
print ::= ( "print" | "println" ) args .