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/simplex-demo/grammar.rkt

8 lines
192 B
Racket

#lang brag
top : func-def{2} func-app
func-def : /"fun" ID /"(" argids /")" /"=" expr
/argids : ID [/"," ID]
expr : ID "+" ID | func-app
func-app : ID /"(" arg [/"," arg] /")"
@arg : ID | INT