1
- use super :: base:: { identifier , number, tstring, ws} ;
1
+ use super :: base:: { hier_identifier , number, tstring, ws} ;
2
2
use crate :: model:: PinDirection ;
3
3
use nom:: branch:: alt;
4
4
use nom:: bytes:: complete:: { is_not, tag} ;
@@ -17,7 +17,7 @@ pub fn instantiate_stmt(s: &str) -> ParseRes<&str, (&str, &str, Vec<BindingT>)>
17
17
terminated (
18
18
tuple ( (
19
19
tstring,
20
- identifier ,
20
+ hier_identifier ,
21
21
delimited (
22
22
tag ( "(" ) ,
23
23
separated_list1 ( ws ( tag ( "," ) ) , binding_parser) ,
@@ -35,7 +35,7 @@ pub fn port_map_stmt(s: &str) -> ParseRes<&str, Vec<&str>> {
35
35
terminated (
36
36
delimited (
37
37
tag ( "(" ) ,
38
- separated_list1 ( ws ( tag ( "," ) ) , identifier ) ,
38
+ separated_list1 ( ws ( tag ( "," ) ) , hier_identifier ) ,
39
39
tag ( ")" ) ,
40
40
) ,
41
41
ws ( tag ( ";" ) ) ,
@@ -52,15 +52,15 @@ pub fn port_direction_declare_stmt(
52
52
map (
53
53
delimited (
54
54
ws ( tag ( "input" ) ) ,
55
- tuple ( ( opt ( bitwidth) , separated_list1 ( tag ( "," ) , identifier ) ) ) ,
55
+ tuple ( ( opt ( bitwidth) , separated_list1 ( tag ( "," ) , hier_identifier ) ) ) ,
56
56
ws ( tag ( ";" ) ) ,
57
57
) ,
58
58
|d| ( PinDirection :: Input , d. 0 , d. 1 ) ,
59
59
) ,
60
60
map (
61
61
delimited (
62
62
ws ( tag ( "output" ) ) ,
63
- tuple ( ( opt ( bitwidth) , separated_list1 ( tag ( "," ) , identifier ) ) ) ,
63
+ tuple ( ( opt ( bitwidth) , separated_list1 ( tag ( "," ) , hier_identifier ) ) ) ,
64
64
ws ( tag ( ";" ) ) ,
65
65
) ,
66
66
|d| ( PinDirection :: Output , d. 0 , d. 1 ) ,
@@ -80,7 +80,7 @@ pub fn wire_declare_stmt(s: &str) -> ParseRes<&str, (Option<(u32, u32)>, Vec<&st
80
80
"Wire Declare Statement" ,
81
81
delimited (
82
82
ws ( tag ( "wire" ) ) ,
83
- tuple ( ( opt ( bitwidth) , separated_list1 ( tag ( "," ) , identifier ) ) ) ,
83
+ tuple ( ( opt ( bitwidth) , separated_list1 ( tag ( "," ) , hier_identifier ) ) ) ,
84
84
ws ( tag ( ";" ) ) ,
85
85
) ,
86
86
) ( s)
@@ -114,7 +114,7 @@ pub fn comment(s: &str) -> ParseRes<&str, ()> {
114
114
fn binding_parser ( s : & str ) -> ParseRes < & str , BindingT > {
115
115
tuple ( (
116
116
preceded ( ws ( tag ( "." ) ) , tstring) ,
117
- delimited ( ws ( tag ( "(" ) ) , identifier , ws ( tag ( ")" ) ) ) ,
117
+ delimited ( ws ( tag ( "(" ) ) , hier_identifier , ws ( tag ( ")" ) ) ) ,
118
118
) ) ( s)
119
119
}
120
120
0 commit comments