//============================================================================================================================//
/** Add a COMMAND declaration. */
void addCommand(boolean followUp, Pos p, String n, boolean c, int o, int b, int seq, int exp, List<CommandScope> s, ExprVar label) throws Err {
if (followUp && !Version.experimental) throw new ErrorSyntax(p, "Syntax error encountering => symbol.");
if (label!=null) p=Pos.UNKNOWN.merge(p).merge(label.pos);
status=3;
if (n.length()==0) throw new ErrorSyntax(p, "Predicate/assertion name cannot be empty.");
if (n.indexOf('@')>=0) throw new ErrorSyntax(p, "Predicate/assertion name cannot contain \'@\'");
String labelName = (label==null || label.label.length()==0) ? n : label.label;
Command parent = followUp ? commands.get(commands.size()-1) : null;
Command newcommand = new Command(p, labelName, c, o, b, seq, exp, s, null, ExprVar.make(null, n), parent);
if (parent!=null) commands.set(commands.size()-1, newcommand); else commands.add(newcommand);
}