From f52121964c20ed70b4b64456ffb412e542a274bb Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Sun, 7 Jan 2018 12:58:25 +0100 Subject: [PATCH] Rez: accept "binary" radix declaration for fields --- Rez/ResourceDefinitions.h | 2 +- Rez/RezLexerNextToken.cc | 1 + Rez/RezParser.yy | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Rez/ResourceDefinitions.h b/Rez/ResourceDefinitions.h index cf84b26a38..e3b27f91e9 100644 --- a/Rez/ResourceDefinitions.h +++ b/Rez/ResourceDefinitions.h @@ -66,7 +66,7 @@ public: enum class Attrs { - none = 0, hex = 1, key = 2, unsigned_ = 4, literal = 8 + none = 0, hex = 1, key = 2, unsigned_ = 4, literal = 8, binary = 16 }; Type type; diff --git a/Rez/RezLexerNextToken.cc b/Rez/RezLexerNextToken.cc index 00cdb70903..dca8d9edda 100644 --- a/Rez/RezLexerNextToken.cc +++ b/Rez/RezLexerNextToken.cc @@ -186,6 +186,7 @@ RezSymbol RezLexer::nextToken() KEYWORD(KEY, "key"), KEYWORD(WIDE,"wide"), KEYWORD(UNSIGNED, "unsigned"), + KEYWORD(BINARY, "binary"), KEYWORD(LITERAL, "literal"), KEYWORD(BOOLEAN, "boolean"), KEYWORD(BIT, "bit"), diff --git a/Rez/RezParser.yy b/Rez/RezParser.yy index 2ac08cd66d..58c2a4fb3d 100644 --- a/Rez/RezParser.yy +++ b/Rez/RezParser.yy @@ -61,6 +61,7 @@ %token WIDE "wide"; %token LITERAL "literal"; %token UNSIGNED "unsigned"; +%token BINARY "binary"; %token BOOLEAN "boolean"; %token BIT "bit"; @@ -303,6 +304,7 @@ field_attribute : "hex" { $$ = SimpleField::Attrs::hex; } | "key" { $$ = SimpleField::Attrs::key; } | "unsigned" { $$ = SimpleField::Attrs::unsigned_; } | "literal" { $$ = SimpleField::Attrs::literal; } + | "binary" { $$ = SimpleField::Attrs::binary; } ; %type switch_definition;