Skip to content

csun-comp430-s22/JamaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

JamaScript

Members
Alan Hernandez
Jonathan Gomez
Angelica De Leon
Megan Ngo

Syntax

var is a variable
classname is the name of a class
methodname is the name of a method
string is a string
int is an integer

type ::= `Boolean` | `String` | `Int` | `class`

op ::= `+` | `-` | `*` | `/` | `>` | `<` | `>=` | `<=` | `==`

exp ::= exp op exp |
        var | int | string |
        true | false |
        exp.methodname(exp*)|
        new classname(exp*)

vardec ::= type var

stmt ::= vardec `=` exp |
        while (exp) stmt |
        if (exp)stmt else stmt; |
        { stmt* } |
        println(exp)|
        return (exp) 

methoddef ::=  type methodname(vardec*) stmt
 
classdef ::= class classname extends classname{
                vardec*
                constructor(vardec*){
                    super(exp*)|                              
                    stmt* 
                }
                methoddef*
            }

program ::= classdef* stmt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages