From b0b6be0d236bede58154dbf3d5425d05af666af9 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 14 May 2013 14:58:34 -0700 Subject: [PATCH] Class properties are optional --- vvp/parse.y | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vvp/parse.y b/vvp/parse.y index 3d02533a3..8fff1c223 100644 --- a/vvp/parse.y +++ b/vvp/parse.y @@ -1,7 +1,7 @@ %{ /* - * Copyright (c) 2001-2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2013 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -847,7 +847,7 @@ statement | T_LABEL K_CLASS T_STRING '[' T_NUMBER ']' { compile_class_start($1, $3, $5); } - class_properties ';' + class_properties_opt ';' { compile_class_done(); } | enum_type @@ -858,6 +858,11 @@ statement | ';' ; +class_properties_opt + : class_properties + | + ; + class_properties : class_properties class_property | class_property