jdk.nashorn.internal.parser.TokenStream Java Examples
The following examples show how to use
jdk.nashorn.internal.parser.TokenStream.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Debug.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #2
Source File: Debug.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #3
Source File: Debug.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #4
Source File: Debug.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #5
Source File: Debug.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #6
Source File: Debug.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #7
Source File: Debug.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #8
Source File: Debug.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #9
Source File: Debug.java From jdk8u_nashorn with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }
Example #10
Source File: Debug.java From nashorn with GNU General Public License v2.0 | 6 votes |
/** * Dump a token stream to stdout * * TODO: most other bugging goes to stderr, change? * * @param source the source * @param lexer the lexer * @param stream the stream to dump */ public static void dumpTokens(final Source source, final Lexer lexer, final TokenStream stream) { TokenType type; int k = 0; do { while (k > stream.last()) { // Get more tokens. lexer.lexify(); } final long token = stream.get(k); type = Token.descType(token); System.out.println("" + k + ": " + Token.toString(source, token, true)); k++; } while(type != EOF); }