1 /*2 * Copyright © 2002 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,3 * California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. has4 * intellectual property rights relating to technology embodied in the product5 * that is described in this document. In particular, and without limitation,6 * these intellectual property rights may include one or more of the U.S.7 * patents listed at http://www.sun.com/patents and one or more additional8 * patents or pending patent applications in the U.S. and in other countries.9 * U.S. Government Rights - Commercial software. Government users are subject10 * to the Sun Microsystems, Inc. standard license agreement and applicable11 * provisions of the FAR and its supplements. Use is subject to license terms.12 * Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered13 * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. This14 * product is covered and controlled by U.S. Export Control laws and may be15 * subject to the export or import laws in other countries. Nuclear, missile,16 * chemical biological weapons or nuclear maritime end uses or end users,17 * whether direct or indirect, are strictly prohibited. Export or reexport18 * to countries subject to U.S. embargo or to entities identified on U.S.19 * export exclusion lists, including, but not limited to, the denied persons20 * and specially designated nationals lists is strictly prohibited.21 */22 23 package org.javacc.parser;24 25 /**26 * Describes lookahead rule for a particular expansion or expansion27 * sequence (See Sequence.java). In case this describes the lookahead28 * rule for a single expansion unit, then a sequence is created with29 * this node as the first element, and the expansion unit as the second30 * and last element.31 */32 33 public class Lookahead extends Expansion {34 35 /**36 * Contains the list of tokens that make up the semantic lookahead37 * if any. If this node represents a different kind of lookahead (other38 * than semantic lookahead), then this vector contains nothing. If39 * this vector contains something, then it is the boolean expression40 * that forms the semantic lookahead. In this case, the following41 * fields "amount" and "la_expansion" are ignored.42 */43 public java.util.Vector action_tokens = new java.util.Vector ();44 45 /**46 * The lookahead amount. Its default value essentially gives us47 * infinite lookahead.48 */49 public int amount = Integer.MAX_VALUE;50 51 /**52 * The expansion used to determine whether or not to choose the53 * corresponding parse option. This expansion is parsed upto54 * "amount" tokens of lookahead or until a complete match for it55 * is found. Usually, this is the same as the expansion to be56 * parsed.57 */58 public Expansion la_expansion;59 60 /**61 * Is set to true if this is an explicit lookahead specification.62 */63 public boolean isExplicit;64 65 }66