+ if ( ! parse_nested_variable (lexer, glm))
+ return false;
+
+ if ( ! lex_force_match (lexer, T_RPAREN))
+ return false;
+ }
+
+ lex_error (lexer, "Nested variables are not yet implemented"); return false;
+ return true;
+}
+
+/* A design term is an interaction OR a nested variable */
+static bool
+parse_design_term (struct lexer *lexer, struct glm_spec *glm)
+{
+ struct interaction *iact = NULL;
+ if (parse_design_interaction (lexer, glm, &iact))
+ {
+ /* Interaction parsing successful. Add to list of interactions */
+ glm->interactions = xrealloc (glm->interactions, sizeof *glm->interactions * ++glm->n_interactions);
+ glm->interactions[glm->n_interactions - 1] = iact;