-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogic_definition_file.txt
24 lines (17 loc) · 1.01 KB
/
logic_definition_file.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
program = section_dev , section_con , section_mon;
section_dev = "DEVICES" , assignment , { assignment } , "END" ;
section_con = "CONNECT" , connection , { connection } , "END" ;
section_mon = "MONITOR" , monitor , { monitor } , "END" ;
assignment = name , { "," , name } , "=" , ( device_arg_dec | device ) , ";" ;
connection = output , ">" , input , { "," , input } , ";" ;
monitor = output , ";" ;
device_arg_dec = device_arg , "(" , argument , ")" ;
device = "DTYPE" | "XOR" | "NOT" ;
device_arg = "CLOCK" | "AND" | "NAND" | "OR" | "NOR" | "SWITCH" ;
output = name , [ "." , dtype_op_name ] ;
input = name , "." , ( ( "I" , argument ) | dtype_ip_name ) ;
argument = digit , { digit } ;
name = letter , { letter | digit } ;
dtype_ip_name = "DATA" | "CLK" | "SET" | "CLEAR" ;
dtype_op_name = "Q" | "QBAR" ;
comment = "#" , { letter | digit | punctuation } ;