From 39e8f270efcbaac3222583ca9fd6fe04639c00d2 Mon Sep 17 00:00:00 2001 From: Austin Godber Date: Mon, 5 Jan 2015 19:04:25 -0700 Subject: [PATCH] now handles sets containing newlines, refs #5 --- antlr_grammar/ODLv21.g4 | 2 +- antlr_grammar/data/set2.lbl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/antlr_grammar/ODLv21.g4 b/antlr_grammar/ODLv21.g4 index 52f24c9..10cb89c 100644 --- a/antlr_grammar/ODLv21.g4 +++ b/antlr_grammar/ODLv21.g4 @@ -67,7 +67,7 @@ sequence_2D // NOTE: Despite the grammar accepting any scalar value in sets, the PDS only // accepts SYMBOL and INTEGER values in sets. See 12.5.6.1 set_value - : '{' scalar_value (',' scalar_value)* '}' + : '{' scalar_value (NEWLINE)? (',' (NEWLINE)? scalar_value (NEWLINE)? )* '}' | '{' '}' ; diff --git a/antlr_grammar/data/set2.lbl b/antlr_grammar/data/set2.lbl index 285a073..8974808 100644 --- a/antlr_grammar/data/set2.lbl +++ b/antlr_grammar/data/set2.lbl @@ -10,4 +10,13 @@ SYM_SET1 = {ONE, SYM_SET2 = {ONE, TWO, THREE} +SYM_SET3 = {ONE + ,TWO + ,THREE} +SYM_SET4 = {ONE + , + TWO + , + THREE + } END