multiple constraints of different type and value assignment
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1262 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/libasn1parser/asn1p_y.y b/libasn1parser/asn1p_y.y
index 8289fa9..d9e56f8 100644
--- a/libasn1parser/asn1p_y.y
+++ b/libasn1parser/asn1p_y.y
@@ -275,7 +275,7 @@
%type <a_expr> DefinedType
%type <a_constr> ValueSet /* {a|b|c}*/
%type <a_expr> ValueSetTypeAssignment /* Val INTEGER ::= {1|2} */
-%type <a_expr> ValueDefinition /* val INTEGER ::= 1*/
+%type <a_expr> ValueAssignment /* val INTEGER ::= 1*/
%type <a_value> Value
%type <a_value> SimpleValue
%type <a_value> DefinedValue
@@ -557,7 +557,7 @@
assert($1->meta_type != AMT_INVALID);
TQ_ADD(&($$->members), $1, next);
}
- | ValueDefinition {
+ | ValueAssignment {
$$ = asn1p_module_new();
checkmem($$);
assert($1->expr_type != A1TC_INVALID);
@@ -1463,8 +1463,8 @@
* value INTEGER ::= 1
* === EOF ===
*/
-ValueDefinition:
- Identifier DefinedType TOK_PPEQ Value {
+ValueAssignment:
+ Identifier Type TOK_PPEQ Value {
$$ = $2;
assert($$->Identifier == NULL);
$$->Identifier = $1;
@@ -1707,9 +1707,6 @@
Constraint:
SubtypeConstraint
- | '(' GeneralConstraint ')' {
- $$ = $2;
- }
;
SubtypeConstraint:
@@ -1756,6 +1753,9 @@
ct = $$;
CONSTRAINT_INSERT($$, ACT_CA_CSV, ct, $5);
}
+ | GeneralConstraint {
+ $$ = $1;
+ }
;
ElementSetSpec: