Logo Search packages:      
Sourcecode: jflex version File versions

Symbol java_cup::runtime::lr_parser::scan (  )  throws java.lang.Exception [inline]

Get the next Symbol from the input (supplied by generated subclass). Once end of file has been reached, all subsequent calls to scan should return an EOF Symbol (which is Symbol number 0). By default this method returns getScanner().next_token(); this implementation can be overriden by the generated parser using the code declared in the "scan with" clause. Do not recycle objects; every call to scan() should return a fresh object.

Definition at line 334 of file lr_parser.java.

References EOF_sym(), getScanner(), and java_cup::runtime::Scanner::next_token().

Referenced by debug_parse(), parse(), read_lookahead(), and restart_lookahead().

    Symbol sym = getScanner().next_token();
    return (sym!=null) ? sym : new Symbol(EOF_sym());

Generated by  Doxygen 1.6.0   Back to index