public static void AcceptProgram(string Text, ref int Index, ref Dictionary<string, Expression> Variables, ref SoundOptions Options, out int ErrorIndex)
{
Variables = new Dictionary<string, Expression>();
Variables[Parameter] = IdentityExpression.Instance;
Variables[Resolution] = ResolutionExpression.Instance;
while (true)
{
AcceptExtendedWhitespace(Text, ref Index);
if (AcceptOption(Text, ref Index, Options, out ErrorIndex))
{
continue;
}
string varname = null;
Expression varvalue = null;
if (AcceptAssignment(Variables, Text, ref Index, ref varname, ref varvalue, out ErrorIndex))
{
Variables[varname] = varvalue;
continue;
}
break;
}
AcceptExtendedWhitespace(Text, ref Index);
}