aboutsummaryrefslogtreecommitdiffstats
path: root/support/tools/TableGen/FileParser.y
diff options
context:
space:
mode:
Diffstat (limited to 'support/tools/TableGen/FileParser.y')
-rw-r--r--support/tools/TableGen/FileParser.y7
1 files changed, 7 insertions, 0 deletions
diff --git a/support/tools/TableGen/FileParser.y b/support/tools/TableGen/FileParser.y
index 624a797..38efb83 100644
--- a/support/tools/TableGen/FileParser.y
+++ b/support/tools/TableGen/FileParser.y
@@ -258,6 +258,13 @@ Value : INTVAL {
} | '[' DefList ']' {
$$ = new ListInit(*$2);
delete $2;
+ } | Value '.' ID {
+ if (!$1->getFieldType(*$3)) {
+ err() << "Cannot access field '" << *$3 << "' of value '" << *$1 << "!\n";
+ abort();
+ }
+ $$ = new FieldInit($1, *$3);
+ delete $3;
};
DefList : /*empty */ {