diff options
Diffstat (limited to 'parser/vyos1x_parser.mly')
-rw-r--r-- | parser/vyos1x_parser.mly | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/parser/vyos1x_parser.mly b/parser/vyos1x_parser.mly index 17f4909..707538d 100644 --- a/parser/vyos1x_parser.mly +++ b/parser/vyos1x_parser.mly @@ -45,15 +45,21 @@ value: ; -leaf_node: +leaf_node_body: | comment = comments; - name = IDENTIFIER; value = value; NEWLINE; + name = IDENTIFIER; value = value; { Vytree.make_full {default_data with values=[value]; comment=comment} name []} | comment = comments; - name = IDENTIFIER; NEWLINE (* valueless node *) + name = IDENTIFIER; (* valueless node *) { Vytree.make_full {default_data with comment=comment} name [] } ; +leaf_node: + | n = leaf_node_body; NEWLINE; + { n } + | n = leaf_node_body; EOF; + { n } + node: | comment = comments; name = IDENTIFIER; LEFT_BRACE; children = list(node_content); RIGHT_BRACE; |