Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow backslash in string, fixes issue #45 #46

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdf_timing/sdflex.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def t_SLASH(t):


def t_STRING(t):
r'[a-zA-Z0-9_\/.\[\]]+'
r'[a-zA-Z0-9_\/.\[\]\\]+'
t.type = reserved.get(t.value, 'STRING')
return t

Expand Down
16 changes: 16 additions & 0 deletions sdf_timing/tests/data/escaped_name.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(DELAYFILE
(SDFVERSION "3.0")
(TIMESCALE 1ps)

(CELL
(CELLTYPE "vpr_interconnect")
(INSTANCE dut/routing_segment_b0_output_0_0_to_c0_input_0_0)
(DELAY
(ABSOLUTE
(INTERCONNECT clk_i TESTENV/clock_generator/clk_mux/CLK1 (1.4:8.4:8.4)(1.6:7.7:7.7))
(INTERCONNECT rstn_i TESTENV/reset_synchronizer_genblk1\[0\]\.ff_1_reg/RESET (3.7:3.5:3.5)(3.8:3.5:3.5))
(INTERCONNECT rstn_i TESTENV/reset_synchronizer_genblk1\[0\]\.ff_2_reg/RESET (3.7:3.5:3.5)(3.8:3.5:3.5))
)
)
)
)
16 changes: 16 additions & 0 deletions sdf_timing/tests/data/golden/escaped_name.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(DELAYFILE
(SDFVERSION "3.0")
(TIMESCALE 1ps)

(CELL
(CELLTYPE "vpr_interconnect")
(INSTANCE dut/routing_segment_b0_output_0_0_to_c0_input_0_0)
(DELAY
(ABSOLUTE
(INTERCONNECT clk_i TESTENV/clock_generator/clk_mux/CLK1 (1.4:8.4:8.4)(1.6:7.7:7.7))
(INTERCONNECT rstn_i TESTENV/reset_synchronizer_genblk1\[0\]\.ff_1_reg/RESET (3.7:3.5:3.5)(3.8:3.5:3.5))
(INTERCONNECT rstn_i TESTENV/reset_synchronizer_genblk1\[0\]\.ff_2_reg/RESET (3.7:3.5:3.5)(3.8:3.5:3.5))
)
)
)
)