diff options
author | Marc Coquand <marc@mccd.space> | 2023-12-26 10:46:11 -0600 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2023-12-26 10:46:11 -0600 |
commit | 2a664a47c73e232b6ff0d261833e2561d4abc4d0 (patch) | |
tree | 8ad1f0c88f6151bff69f63d61e1e447d2ae5b034 /lib/parser.mly | |
parent | d96e1839eb800bf26bcc38272072d98af69f5d83 (diff) | |
download | fixgen-2a664a47c73e232b6ff0d261833e2561d4abc4d0.tar.gz fixgen-2a664a47c73e232b6ff0d261833e2561d4abc4d0.tar.bz2 fixgen-2a664a47c73e232b6ff0d261833e2561d4abc4d0.zip |
Support list
Diffstat (limited to '')
-rw-r--r-- | lib/parser.mly | 7 |
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 } + ; |