com.hdcookbook.grin.io.text
Class ForwardReference

java.lang.Object
  extended by com.hdcookbook.grin.io.text.ForwardReference

public abstract class ForwardReference
extends java.lang.Object

Used by the parser when it encounters something that might be a forward reference. It's used to defer some computation in parsing until the reference is resolved.

Author:
Bill Foote (http://jovial.com)

Constructor Summary
ForwardReference(Lexer lexer)
           
 
Method Summary
 void reportError(java.lang.String msg)
          Convenience method for reporting an error.
abstract  void resolve()
          Called by the parser after the entire file has been parsed, and it's time to resolve this forward reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForwardReference

public ForwardReference(Lexer lexer)
Method Detail

resolve

public abstract void resolve()
                      throws java.io.IOException
Called by the parser after the entire file has been parsed, and it's time to resolve this forward reference.

Throws:
java.io.IOException

reportError

public void reportError(java.lang.String msg)
                 throws java.io.IOException
Convenience method for reporting an error. The error message gives the line number where the construct we represent was read.

Throws:
java.io.IOException