timll / while-analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A bit of the while language combined with java-style.

Program -> (Stmt;)+

CompoundStmt -> { (Stmt;)* } 

Stmt -> Type Var = Expr |
        Var = Expr |
        skip |
        if (Expr) CompoundStmt [else CompoundStmt] |
        while (Expr) CompoundStmt

Type -> int | bool

Expr -> Boolean |
        Number |
        Var |
        Expr Binop Expr |
        Unop Expr

Boolean -> true | false

Binop -> ABinop | CBinop

ABinop -> + | - | * | /

CBinop -> < | <= | == | != | => | >

Unop -> - | !

About


Languages

Language:C++ 98.8%Language:Hack 0.8%Language:Makefile 0.4%