I write a BNF grammar like this:
#lang pl
#| BNF for the LE language:
<LE> ::= <num>
| <null>
|#
(define-type LE
[Num Number]
)
but I am not sure how to check if this code are good... how to check in racket the the only thing that we can use its null and numbers?
I think something like that:
(test 5)
but
(test '())
working too, and I am not setting List in my BNF
(if this code are not good - I will be happy for some BNF example and checking...)
pl
is not part of the main distribution, you will need to give some more information. Is thepl
language from Bremner's course? (cs.unb.ca/~bremner/teaching/cs3613/racket-setup ). If so which version of Racket is it for? – soegaard