diff --git a/liberty/LibertyLex.ll b/liberty/LibertyLex.ll index 1bac5e9f..ccf2aea5 100644 --- a/liberty/LibertyLex.ll +++ b/liberty/LibertyLex.ll @@ -78,7 +78,7 @@ TOKEN ({ALPHA}|{DIGIT}|_)({ALPHA}|{DIGIT}|[._\-])*(:({ALPHA}|{DIGIT}|_)+)? /* bus_naming_style : %s[%d] ; */ BUS_STYLE "%s"{BUS_LEFT}"%d"{BUS_RIGHT} PUNCTUATION [,\:;|(){}+*&!'=] -TOKEN_END {PUNCTUATION}|[ \t\r\n] +TOKEN_END {PUNCTUATION}|[ \t\r\n]|\\{EOL} EOL \r?\n %% diff --git a/test/liberty_backslash_eol.lib b/test/liberty_backslash_eol.lib new file mode 100644 index 00000000..d79dbe30 --- /dev/null +++ b/test/liberty_backslash_eol.lib @@ -0,0 +1,51 @@ +library (liberty_backslash_eol) { + delay_model : "table_lookup"; + simulation : false; + capacitive_load_unit\ + (1,pF); + leakage_power_unit : "1pW"; + current_unit : "1A"; + pulling_resistance_unit : "1kohm"; + time_unit : "1ns"; + voltage_unit : "1v"; + library_features : "report_delay_calculation"; + input_threshold_pct_rise : 50; + input_threshold_pct_fall : 50; + output_threshold_pct_rise : 50; + output_threshold_pct_fall : 50; + slew_lower_threshold_pct_rise : 30; + slew_lower_threshold_pct_fall : 30; + slew_upper_threshold_pct_rise : 70; + slew_upper_threshold_pct_fall : 70; + slew_derate_from_library : 1.0; + nom_process : 1.0; + nom_temperature : 85.0; + nom_voltage : 0.75; + + cell (my_inv) { + pin (A) { + capacitance : 1; + direction : "input"; + } + pin (Y) { + function : "!A"; + direction : "output"; + timing () { + related_pin : "A"; + timing_sense : "negative_unate"; + cell_rise (scalar) { + values ("1"); + } + cell_fall (scalar) { + values ("1"); + } + rise_transition (scalar) { + values ("1"); + } + fall_transition (scalar) { + values ("1"); + } + } + } + } +} diff --git a/test/liberty_backslash_eol.ok b/test/liberty_backslash_eol.ok new file mode 100644 index 00000000..e69de29b diff --git a/test/liberty_backslash_eol.tcl b/test/liberty_backslash_eol.tcl new file mode 100644 index 00000000..01df1c62 --- /dev/null +++ b/test/liberty_backslash_eol.tcl @@ -0,0 +1,2 @@ +# backslash eol should be ignored in liberty file +read_liberty liberty_backslash_eol.lib diff --git a/test/regression_vars.tcl b/test/regression_vars.tcl index 2d0b5b0f..2d71a1ac 100644 --- a/test/regression_vars.tcl +++ b/test/regression_vars.tcl @@ -145,6 +145,7 @@ record_sta_tests { get_objrefs liberty_arcs_one2one_1 liberty_arcs_one2one_2 + liberty_backslash_eol liberty_ccsn liberty_latch3 path_group_names