3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-26 18:45:34 +00:00

Enable {* .. *} feature per default (removes dependency to REJECT feature in flex)

This commit is contained in:
Clifford Wolf 2013-11-22 12:46:02 +01:00
parent 18d003254c
commit e4429c480e
5 changed files with 3 additions and 24 deletions

View file

@ -45,7 +45,6 @@ using namespace VERILOG_FRONTEND;
namespace VERILOG_FRONTEND {
std::vector<std::string> fn_stack;
std::vector<int> ln_stack;
bool lexer_feature_defattr;
}
%}
@ -82,9 +81,6 @@ namespace VERILOG_FRONTEND {
"`timescale"[ \t]+[^ \t\r\n/]+[ \t]*"/"[ \t]*[^ \t\r\n]* /* ignore timescale directive */
"`yosys_enable_defattr" lexer_feature_defattr = true;
"`yosys_disable_defattr" lexer_feature_defattr = false;
"`"[a-zA-Z_$][a-zA-Z0-9_$]* {
frontend_verilog_yyerror("Unimplemented compiler directive or undefined macro %s.", yytext);
}
@ -225,8 +221,8 @@ supply1 { return TOK_SUPPLY1; }
"(*" { return ATTR_BEGIN; }
"*)" { return ATTR_END; }
"{*" { if (lexer_feature_defattr) return DEFATTR_BEGIN; else REJECT; }
"*}" { if (lexer_feature_defattr) return DEFATTR_END; else REJECT; }
"{*" { return DEFATTR_BEGIN; }
"*}" { return DEFATTR_END; }
"**" { return OP_POW; }
"||" { return OP_LOR; }