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.
16 lines
521 B
Racket
16 lines
521 B
Racket
9 years ago
|
#lang brag
|
||
9 years ago
|
|
||
9 years ago
|
chip-program : /"CHIP" chipname /"{" in-spec out-spec part-spec /"}"
|
||
9 years ago
|
@chipname : ID
|
||
9 years ago
|
in-spec : pin-spec
|
||
|
out-spec : pin-spec
|
||
|
@pin-spec : (/"IN" | /"OUT") pin [/"," pin]* /";"
|
||
9 years ago
|
/pin : ID [/"[" NUMBER /"]"]
|
||
9 years ago
|
@part-spec : /"PARTS:" part+
|
||
9 years ago
|
part : partname /"(" wire-assign [/"," wire-assign]* /")" /";"
|
||
9 years ago
|
@partname : ID
|
||
9 years ago
|
/wire-assign : pin-range /"=" pin-val
|
||
|
/pin-range : ID [/"[" bus-range /"]"]
|
||
|
@bus-range : number [/"." /"." number]
|
||
7 years ago
|
@pin-val : pin-range | BINARY-NUMBER | TRUE | FALSE
|
||
9 years ago
|
@number : BINARY-NUMBER | NUMBER
|