Exemple #1
0
            private void JsonArray(TerminalSet _TS, out BaseTerm t)
            {
                BaseTerm        e;
                List <BaseTerm> listItems = new List <BaseTerm>();

                GetSymbol(new TerminalSet(terminalCount, LSqBracket), true, true);
                GetSymbol(new TerminalSet(terminalCount, IntLiteral, RealLiteral, StringLiteral, LSqBracket, RSqBracket, LCuBracket,
                                          TrueSym, FalseSym, NullSym), false, true);
                if (symbol.IsMemberOf(IntLiteral, RealLiteral, StringLiteral, LSqBracket, LCuBracket, TrueSym, FalseSym, NullSym))
                {
                    while (true)
                    {
                        JsonValue(new TerminalSet(terminalCount, Comma, RSqBracket), out e);
                        listItems.Add(e);
                        GetSymbol(new TerminalSet(terminalCount, Comma, RSqBracket), false, true);
                        if (symbol.TerminalId == Comma)
                        {
                            symbol.SetProcessed();
                        }
                        else
                        {
                            break;
                        }
                    }
                }
                GetSymbol(new TerminalSet(terminalCount, RSqBracket), true, true);
                t = new CompoundTerm("array", ListTerm.ListFromArray(listItems.ToArray(), BaseTerm.EMPTYLIST));
            }
 public IEnumerator <ListTerm> GetEnumerator()
 {
     do
     {
         yield return(ListTerm.ListFromArray(configuration));
     }while (NextPermutation());
 }