RuleEndElement.java
Upload User: afrynkmhm
Upload Date: 2007-01-06
Package Size: 1262k
Code Size: 1k
Development Platform:

Others

  1. package antlr;
  2. /* ANTLR Translator Generator
  3.  * Project led by Terence Parr at http://www.jGuru.com
  4.  * Software rights: http://www.antlr.org/RIGHTS.html
  5.  *
  6.  * $Id: //depot/code/org.antlr/release/antlr-2.7.0/antlr/RuleEndElement.java#1 $
  7.  */
  8. /**Contains a list of all places that reference
  9.  * this enclosing rule.  Useful for FOLLOW computations.
  10.  */
  11. class RuleEndElement extends BlockEndElement {
  12. protected Lookahead[] cache; // Each rule can cache it's lookahead computation.
  13. // The FOLLOW(rule) is stored in this cache.
  14. // 1..k
  15. protected boolean noFOLLOW;
  16. public RuleEndElement(Grammar g) {
  17. super(g);
  18. cache = new Lookahead[g.maxk+1];
  19. }
  20. public Lookahead look(int k) {
  21. return grammar.theLLkAnalyzer.look(k, this);
  22. }
  23. public String toString() {
  24. //return " [RuleEnd]";
  25. return "";
  26. }
  27. }