aboutsummaryrefslogtreecommitdiff
path: root/lib/parser.mly
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parser.mly')
-rw-r--r--lib/parser.mly7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/parser.mly b/lib/parser.mly
index 6e21480..8a666c6 100644
--- a/lib/parser.mly
+++ b/lib/parser.mly
@@ -35,6 +35,9 @@ row:
| row_title = IDENTIFIER; UUIDV4; COMMA; r = row { Uuidv4 (row_title, r) }
| row_title = IDENTIFIER; UUIDV4 { Uuidv4 (row_title, End) }
+ | row_title = IDENTIFIER; LBRACE; union = union_fields; RBRACE; COMMA; r = row { List (row_title, union, r) }
+ | row_title = IDENTIFIER; LBRACE; union = union_fields; RBRACE { List (row_title, union, End) }
+
| row_title = IDENTIFIER; NAME; COMMA; r = row { Name (row_title, r) }
| row_title = IDENTIFIER; NAME { Name (row_title, End) }
@@ -44,3 +47,7 @@ row:
| row_title = IDENTIFIER; INTSYMBOL;LBRACE;min = INT;COMMA;max = INT;RBRACE;COMMA; r = row { Int (row_title,min,max,r) }
| row_title = IDENTIFIER; INTSYMBOL;LBRACE;min = INT;COMMA;max = INT;RBRACE; { Int (row_title,min,max,End) }
;
+
+union_fields:
+ vl = separated_list(COMMA, STRING) { vl }
+ ;