OpenSTA/liberty/LibertyParse.yy

256 lines
5.3 KiB
Plaintext
Raw Normal View History

2018-09-28 17:54:21 +02:00
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2025, Parallax Software, Inc.
2018-09-28 17:54:21 +02:00
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2018-09-28 17:54:21 +02:00
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
// The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software.
//
// Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// This notice may not be removed or altered from any source distribution.
2021-03-16 18:27:17 +01:00
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
%{
#include <cstdlib>
2020-04-05 20:35:51 +02:00
LibExpr/spef/saif c++ parsers commit a686a6f77e555513adc40228471c1ad1af4646b3 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:44 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 986a3a00c246a927c494066c56bb627e55da8692 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:32 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e8664d21c0b404a82967201c19a087c6680b7177 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 16:36:19 2025 -0800 saif compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 496569018791bff19e57c534f29ac085520fc520 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 15:25:44 2025 -0800 mv bison error funcs to .yy Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c1e7638840f94eb0baddee47507e607b000ab858 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:26 2025 -0800 parser cledanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 22bc72af46114ddb4fc5876655887ef1189f2195 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:06 2025 -0800 parser cleanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit caeedc4c9e2bf8e7a2f4aceb4ee4a5758efd1b36 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:52:55 2025 -0800 LibertyParser stack stream Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e029a01c2fc5ba0ed336978c5853d49095d07d66 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:10:35 2025 -0800 bison 3.2 required Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2ca9423a2d518f51fdee6c41d41348dbfd548bae Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:05:19 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d64df413675c2978c0f24d5594cc201032233447 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 11:18:05 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 57cfbae240984bd7928862b1d6c3b1047ee5d71f Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:25:49 2025 -0800 comment Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5249ac32d809ba30ce09437d61beaf4360bc2cd8 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:24:35 2025 -0800 parseError Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8c5442007f99c06bfb16a496e00862353c82282c Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:11:46 2025 -0800 libecxpr parseError unused Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 67dacf60db2c0d7e3f7ceeae672b4bdaf1e039b7 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:09:39 2025 -0800 reader pvt includes Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1d7097399b4242833bf5a478c903b5d98afe674b Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:33:37 2025 -0800 libexpr life Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cc85e357463399291cb1e7d7b628e5dd356ac8a9 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:21:12 2025 -0800 libexpr no location Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e3ef17a746eb4e8822cce732250ae77261d53cf9 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 22:15:50 2025 -0800 compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3a34874297a5c82930ee0bd131425bccf48526ce Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 20:03:06 2025 -0800 libexpr parse Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-01 23:49:30 +01:00
#include "Report.hh"
2020-04-05 20:35:51 +02:00
#include "liberty/LibertyParser.hh"
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
#include "liberty/LibertyScanner.hh"
2018-09-28 17:54:21 +02:00
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
#undef yylex
#define yylex scanner->lex
2018-09-28 17:54:21 +02:00
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
// warning: variable 'yynerrs_' set but not used
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
2021-03-16 18:27:17 +01:00
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
#define loc_line(loc) loc.begin.line
LibExpr/spef/saif c++ parsers commit a686a6f77e555513adc40228471c1ad1af4646b3 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:44 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 986a3a00c246a927c494066c56bb627e55da8692 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:32 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e8664d21c0b404a82967201c19a087c6680b7177 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 16:36:19 2025 -0800 saif compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 496569018791bff19e57c534f29ac085520fc520 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 15:25:44 2025 -0800 mv bison error funcs to .yy Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c1e7638840f94eb0baddee47507e607b000ab858 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:26 2025 -0800 parser cledanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 22bc72af46114ddb4fc5876655887ef1189f2195 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:06 2025 -0800 parser cleanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit caeedc4c9e2bf8e7a2f4aceb4ee4a5758efd1b36 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:52:55 2025 -0800 LibertyParser stack stream Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e029a01c2fc5ba0ed336978c5853d49095d07d66 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:10:35 2025 -0800 bison 3.2 required Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2ca9423a2d518f51fdee6c41d41348dbfd548bae Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:05:19 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d64df413675c2978c0f24d5594cc201032233447 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 11:18:05 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 57cfbae240984bd7928862b1d6c3b1047ee5d71f Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:25:49 2025 -0800 comment Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5249ac32d809ba30ce09437d61beaf4360bc2cd8 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:24:35 2025 -0800 parseError Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8c5442007f99c06bfb16a496e00862353c82282c Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:11:46 2025 -0800 libecxpr parseError unused Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 67dacf60db2c0d7e3f7ceeae672b4bdaf1e039b7 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:09:39 2025 -0800 reader pvt includes Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1d7097399b4242833bf5a478c903b5d98afe674b Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:33:37 2025 -0800 libexpr life Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cc85e357463399291cb1e7d7b628e5dd356ac8a9 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:21:12 2025 -0800 libexpr no location Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e3ef17a746eb4e8822cce732250ae77261d53cf9 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 22:15:50 2025 -0800 compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3a34874297a5c82930ee0bd131425bccf48526ce Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 20:03:06 2025 -0800 libexpr parse Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-01 23:49:30 +01:00
void
sta::LibertyParse::error(const location_type &loc,
const std::string &msg)
LibExpr/spef/saif c++ parsers commit a686a6f77e555513adc40228471c1ad1af4646b3 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:44 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 986a3a00c246a927c494066c56bb627e55da8692 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:32 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e8664d21c0b404a82967201c19a087c6680b7177 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 16:36:19 2025 -0800 saif compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 496569018791bff19e57c534f29ac085520fc520 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 15:25:44 2025 -0800 mv bison error funcs to .yy Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c1e7638840f94eb0baddee47507e607b000ab858 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:26 2025 -0800 parser cledanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 22bc72af46114ddb4fc5876655887ef1189f2195 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:06 2025 -0800 parser cleanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit caeedc4c9e2bf8e7a2f4aceb4ee4a5758efd1b36 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:52:55 2025 -0800 LibertyParser stack stream Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e029a01c2fc5ba0ed336978c5853d49095d07d66 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:10:35 2025 -0800 bison 3.2 required Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2ca9423a2d518f51fdee6c41d41348dbfd548bae Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:05:19 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d64df413675c2978c0f24d5594cc201032233447 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 11:18:05 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 57cfbae240984bd7928862b1d6c3b1047ee5d71f Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:25:49 2025 -0800 comment Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5249ac32d809ba30ce09437d61beaf4360bc2cd8 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:24:35 2025 -0800 parseError Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8c5442007f99c06bfb16a496e00862353c82282c Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:11:46 2025 -0800 libecxpr parseError unused Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 67dacf60db2c0d7e3f7ceeae672b4bdaf1e039b7 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:09:39 2025 -0800 reader pvt includes Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1d7097399b4242833bf5a478c903b5d98afe674b Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:33:37 2025 -0800 libexpr life Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cc85e357463399291cb1e7d7b628e5dd356ac8a9 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:21:12 2025 -0800 libexpr no location Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e3ef17a746eb4e8822cce732250ae77261d53cf9 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 22:15:50 2025 -0800 compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3a34874297a5c82930ee0bd131425bccf48526ce Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 20:03:06 2025 -0800 libexpr parse Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-01 23:49:30 +01:00
{
reader->report()->fileError(164, reader->filename().c_str(),
loc.begin.line, "%s", msg.c_str());
}
2018-09-28 17:54:21 +02:00
%}
%require "3.2"
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
%skeleton "lalr1.cc"
%debug
%define api.namespace {sta}
%locations
%define api.location.file "LibertyLocation.hh"
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
%define parse.assert
%parse-param { LibertyScanner *scanner }
%parse-param { LibertyParser *reader }
LibExpr/spef/saif c++ parsers commit a686a6f77e555513adc40228471c1ad1af4646b3 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:44 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 986a3a00c246a927c494066c56bb627e55da8692 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 18:45:32 2025 -0800 spef compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e8664d21c0b404a82967201c19a087c6680b7177 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 16:36:19 2025 -0800 saif compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 496569018791bff19e57c534f29ac085520fc520 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 15:25:44 2025 -0800 mv bison error funcs to .yy Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c1e7638840f94eb0baddee47507e607b000ab858 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:26 2025 -0800 parser cledanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 22bc72af46114ddb4fc5876655887ef1189f2195 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 14:19:06 2025 -0800 parser cleanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit caeedc4c9e2bf8e7a2f4aceb4ee4a5758efd1b36 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:52:55 2025 -0800 LibertyParser stack stream Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e029a01c2fc5ba0ed336978c5853d49095d07d66 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:10:35 2025 -0800 bison 3.2 required Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2ca9423a2d518f51fdee6c41d41348dbfd548bae Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 12:05:19 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d64df413675c2978c0f24d5594cc201032233447 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 11:18:05 2025 -0800 LibertyExpr -> LibExpr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 57cfbae240984bd7928862b1d6c3b1047ee5d71f Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:25:49 2025 -0800 comment Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5249ac32d809ba30ce09437d61beaf4360bc2cd8 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:24:35 2025 -0800 parseError Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8c5442007f99c06bfb16a496e00862353c82282c Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:11:46 2025 -0800 libecxpr parseError unused Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 67dacf60db2c0d7e3f7ceeae672b4bdaf1e039b7 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 10:09:39 2025 -0800 reader pvt includes Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1d7097399b4242833bf5a478c903b5d98afe674b Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:33:37 2025 -0800 libexpr life Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cc85e357463399291cb1e7d7b628e5dd356ac8a9 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 31 09:21:12 2025 -0800 libexpr no location Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e3ef17a746eb4e8822cce732250ae77261d53cf9 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 22:15:50 2025 -0800 compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3a34874297a5c82930ee0bd131425bccf48526ce Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 30 20:03:06 2025 -0800 libexpr parse Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-01 23:49:30 +01:00
%define api.parser.class {LibertyParse}
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
%expect 2
2018-09-28 17:54:21 +02:00
%union {
char *string;
float number;
2021-03-16 18:27:17 +01:00
char ch;
2018-09-28 17:54:21 +02:00
sta::LibertyAttrValue *attr_value;
sta::LibertyAttrValueSeq *attr_values;
sta::LibertyGroup *group;
sta::LibertyStmt *stmt;
}
%left '+' '-' '|'
%left '*' '/' '&'
2021-03-16 18:27:17 +01:00
%left '^'
%left '!'
2018-09-28 17:54:21 +02:00
%token <number> FLOAT
%token <string> STRING KEYWORD
%type <stmt> statement complex_attr simple_attr variable group file
%type <attr_values> attr_values
2021-03-16 18:27:17 +01:00
%type <attr_value> attr_value
%type <string> string expr expr_term expr_term1 volt_expr
%type <ch> expr_op volt_op
2018-09-28 17:54:21 +02:00
%start file
%%
file:
group
;
group:
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
KEYWORD '(' ')' '{'
{ reader->groupBegin($1, nullptr, loc_line(@1)); }
2018-09-28 17:54:21 +02:00
'}' semi_opt
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
{ $$ = reader->groupEnd(); }
| KEYWORD '(' ')' '{'
{ reader->groupBegin($1, nullptr, loc_line(@1)); }
2018-09-28 17:54:21 +02:00
statements '}' semi_opt
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
{ $$ = reader->groupEnd(); }
| KEYWORD '(' attr_values ')' '{'
{ reader->groupBegin($1, $3, loc_line(@1)); }
2018-09-28 17:54:21 +02:00
'}' semi_opt
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
{ $$ = reader->groupEnd(); }
| KEYWORD '(' attr_values ')' '{'
{ reader->groupBegin($1, $3, loc_line(@1)); }
2018-09-28 17:54:21 +02:00
statements '}' semi_opt
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
{ $$ = reader->groupEnd(); }
2018-09-28 17:54:21 +02:00
;
statements:
statement
| statements statement
;
statement:
simple_attr
| complex_attr
| group
| variable
;
simple_attr:
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
KEYWORD ':' attr_value semi_opt
{ $$ = reader->makeSimpleAttr($1, $3, loc_line(@1)); }
2018-09-28 17:54:21 +02:00
;
complex_attr:
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
KEYWORD '(' ')' semi_opt
{ $$ = reader->makeComplexAttr($1, nullptr, loc_line(@1)); }
| KEYWORD '(' attr_values ')' semi_opt
{ $$ = reader->makeComplexAttr($1, $3, loc_line(@1)); }
2018-09-28 17:54:21 +02:00
;
attr_values:
attr_value
{ $$ = new sta::LibertyAttrValueSeq;
$$->push_back($1);
}
| attr_values ',' attr_value
{ $1->push_back($3);
$$ = $1;
}
| attr_values attr_value
{ $1->push_back($2);
$$ = $1;
}
;
variable:
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
string '=' FLOAT semi_opt
{ $$ = reader->makeVariable($1, $3, loc_line(@1)); }
2018-09-28 17:54:21 +02:00
;
string:
STRING
{ $$ = $1; }
| KEYWORD
{ $$ = $1; }
;
attr_value:
FLOAT
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
{ $$ = reader->makeFloatAttrValue($1); }
2021-03-16 18:27:17 +01:00
| expr
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
{ $$ = reader->makeStringAttrValue($1); }
2021-03-16 18:27:17 +01:00
| volt_expr
liberty parser c++ commit 1abf72bc3430d34a51d82992f1c753f0274a662a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 27 08:01:04 2025 -0700 rm unused lib visitors Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1e76acfc7829a8ba82f96d369fae6225a7361844 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 21:15:46 2025 -0700 verilog/sdf stream->is_open Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4a57c0354ffb6c4edfc3269d56a937c11ad9609 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 19:54:41 2025 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b992ed1124a862cb04f0c7617a4575f916c3fe01 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:39:16 2025 -0700 liberty mv string_buf to scanner Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 894cbfa5d5b731738dcc60d492689fad9d13bd40 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 16:29:42 2025 -0700 liberty use regex to parse include file Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 176225849d3fcac0b2be1a5b623270c386daed3d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:48:09 2025 -0700 liberty include filename Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 516e12721d7185015d8c29e8b16fa185f0f46983 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:31:18 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32098a2159798dfbb80140927949bb36f480093d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 15:01:47 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880214e632d756c3199b000fee88fd4fdffac371 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 13:55:02 2025 -0700 liberty include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ad1efca842a6d7ee608ffd5a19a69885786b77fa Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:11:07 2025 -0700 liberty passes all but include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e71cf1f39dd09e81cf2b0e5a12dcf51675f2a6fd Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 26 10:01:08 2025 -0700 liberty parser use class compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02dea0ff753b0fa12f280661a46e2c0ef2432357 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 25 19:08:06 2025 -0700 liberty parser compiles Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-01-27 16:33:35 +01:00
{ $$ = reader->makeStringAttrValue($1); }
2018-09-28 17:54:21 +02:00
;
/* Voltage expressions are ignored. */
2021-03-16 18:27:17 +01:00
/* Crafted to avoid conflicts with expr */
2018-09-28 17:54:21 +02:00
volt_expr:
2021-03-16 18:27:17 +01:00
FLOAT volt_op FLOAT
{ $$ = sta::stringPrint("%e%c%e", $1, $2, $3); }
| string volt_op FLOAT
{ $$ = sta::stringPrint("%s%c%e", $1, $2, $3);
sta::stringDelete($1);
}
| FLOAT volt_op string
{ $$ = sta::stringPrint("%e%c%s", $1, $2, $3);
sta::stringDelete($3);
}
| volt_expr volt_op FLOAT
{ $$ = sta::stringPrint("%s%c%e", $1, $2, $3);
sta::stringDelete($1);
}
;
volt_op:
'+'
{ $$ = '+'; }
| '-'
{ $$ = '-'; }
| '*'
{ $$ = '*'; }
| '/'
{ $$ = '/'; }
;
expr:
expr_term1
| expr_term1 expr_op expr
{ $$ = sta::stringPrint("%s%c%s", $1, $2, $3);
sta::stringDelete($1);
sta::stringDelete($3);
}
;
expr_term:
string
| '0'
{ $$ = sta::stringPrint("0"); }
| '1'
{ $$ = sta::stringPrint("1"); }
| '(' expr ')'
{ $$ = sta::stringPrint("(%s)", $2);
sta::stringDelete($2);
}
;
expr_term1:
expr_term
| '!' expr_term
{ $$ = sta::stringPrint("!%s", $2);
sta::stringDelete($2);
}
| expr_term '\''
{ $$ = sta::stringPrint("%s'", $1);
sta::stringDelete($1);
}
2018-09-28 17:54:21 +02:00
;
expr_op:
'+'
2021-03-16 18:27:17 +01:00
{ $$ = '+'; }
| '|'
{ $$ = '|'; }
2018-09-28 17:54:21 +02:00
| '*'
2021-03-16 18:27:17 +01:00
{ $$ = '*'; }
| '&'
{ $$ = '&'; }
| '^'
{ $$ = '^'; }
2018-09-28 17:54:21 +02:00
;
semi_opt:
/* empty */
| semi_opt ';'
;
%%