// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/grammar/Production.java
// public class Production implements Serializable {
// 
//     public Symbol sym;
//     public Symbol[] produces;
//     public int id;
// 
//     public Production(Symbol sym, Symbol[] produces, int id) {
//         this.sym = sym;
//         this.produces = produces;
//         this.id = id;
//     }
// 
//     public boolean almostEquals(Production other) {
//         if (this.sym != other.sym) {
//             return false;
//         }
//         if (other.produces.length != this.produces.length) {
//             return false;
//         }
//         for (int i = 0; i < produces.length; i++) {
//             if (other.produces[i] != this.produces[i]) {
//                 return false;
//             }
//         }
//         return true;
//     }
// 
//     @Override
//     public String toString() {
//         StringBuilder sb = new StringBuilder();
//         sb.append(sym.identifier);
//         sb.append("->");
//         for (Symbol produce : produces) {
//             sb.append(produce.identifier);
//         }
//         return sb.toString();
//     }
// 
// }
// 
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/grammar/Symbol.java
// @ToString
// @EqualsAndHashCode
// public class Symbol implements Serializable{
// 
//     public static final Symbol NULL = new Symbol("NULL", true);
//     public static final Symbol EOF = new Symbol("EOF", true);
//     public static final Symbol ERROR = new Symbol("ERROR", true);
// 
//     public String identifier;
//     public boolean isTerminal;
// 
//     private Symbol(String identifier, boolean isTerminal) {
//         this.identifier = identifier;
//         this.isTerminal = isTerminal;
//     }
// 
//     public static Symbol create(String identifier, boolean isTerminal) {
//         return new Symbol(identifier, isTerminal);
//     }
// }


import org.ngscript.parseroid.grammar.Production;
import org.ngscript.parseroid.grammar.Symbol;
import java.util.HashMap;
import java.util.Map;
/*
 * Copyright 2021 wssccc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.ngscript.parseroid.table;



/**
 * @author wssccc
 */
public class Item {

    Production production;
    int pos;
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/grammar/Production.java
// public class Production implements Serializable {
// 
//     public Symbol sym;
//     public Symbol[] produces;
//     public int id;
// 
//     public Production(Symbol sym, Symbol[] produces, int id) {
//         this.sym = sym;
//         this.produces = produces;
//         this.id = id;
//     }
// 
//     public boolean almostEquals(Production other) {
//         if (this.sym != other.sym) {
//             return false;
//         }
//         if (other.produces.length != this.produces.length) {
//             return false;
//         }
//         for (int i = 0; i < produces.length; i++) {
//             if (other.produces[i] != this.produces[i]) {
//                 return false;
//             }
//         }
//         return true;
//     }
// 
//     @Override
//     public String toString() {
//         StringBuilder sb = new StringBuilder();
//         sb.append(sym.identifier);
//         sb.append("->");
//         for (Symbol produce : produces) {
//             sb.append(produce.identifier);
//         }
//         return sb.toString();
//     }
// 
// }
// 
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/grammar/Symbol.java
// @ToString
// @EqualsAndHashCode
// public class Symbol implements Serializable{
// 
//     public static final Symbol NULL = new Symbol("NULL", true);
//     public static final Symbol EOF = new Symbol("EOF", true);
//     public static final Symbol ERROR = new Symbol("ERROR", true);
// 
//     public String identifier;
//     public boolean isTerminal;
// 
//     private Symbol(String identifier, boolean isTerminal) {
//         this.identifier = identifier;
//         this.isTerminal = isTerminal;
//     }
// 
//     public static Symbol create(String identifier, boolean isTerminal) {
//         return new Symbol(identifier, isTerminal);
//     }
// }


// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/table/Item.java
import org.ngscript.parseroid.grammar.Production;
import org.ngscript.parseroid.grammar.Symbol;
import java.util.HashMap;
import java.util.Map;

/*
 * Copyright 2021 wssccc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.ngscript.parseroid.table;



/**
 * @author wssccc
 */
public class Item {

    Production production;
    int pos;
    Map<String, Symbol> lookahead = new HashMap<>();