You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
beautiful-racket/beautiful-racket-demo/algebra-demo/grammar.rkt

10 lines
222 B
Racket

#lang brag
7 years ago
top : (func-def | func-app)*
7 years ago
func-def : /"fun" var /"(" vars /")" /"=" expr
/vars : var [/"," var]
expr : var "+" var | value
@value : var | INT | func-app
func-app : var /"(" value [/"," value] /")"
7 years ago
@var : ID