aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/symop.y11
1 files changed, 7 insertions, 4 deletions
diff --git a/libcrystfel/src/symop.y b/libcrystfel/src/symop.y
index a304ea37..bebf823f 100644
--- a/libcrystfel/src/symop.y
+++ b/libcrystfel/src/symop.y
@@ -70,10 +70,13 @@
%type <r> fraction
%{
-static int try_add_symop(SymOpList *list, RationalMatrix *m)
+static int try_add_symop(SymOpList *list, RationalMatrix *m, int complain)
{
if ( list == NULL ) {
- yyerror(m, list, "Must be a single symmetry operation");
+ /* Only complain if this isn't the only operation provided */
+ if ( complain ) {
+ yyerror(m, list, "Must be a single symmetry operation");
+ }
return 1;
} else {
IntegerMatrix *im;
@@ -92,8 +95,8 @@ static int try_add_symop(SymOpList *list, RationalMatrix *m)
%%
symoplist:
- symop { if ( try_add_symop(list, m) ) YYERROR; }
-| symoplist SEMICOLON symop { if ( try_add_symop(list, m) ) YYERROR; }
+ symop { try_add_symop(list, m, 0); }
+| symoplist SEMICOLON symop { if ( try_add_symop(list, m, 1) ) YYERROR; }
;
symop: