From 55bf45f6db41d765701bbf96daa6af12861929fb Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Sat, 15 Mar 2014 16:49:29 +0100 Subject: [PATCH] Add javadoc --- src/main/java/org/z3950/zing/cql/CQLLexer.java | 2 +- src/main/java/org/z3950/zing/cql/CQLTokenizer.java | 23 +++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/z3950/zing/cql/CQLLexer.java b/src/main/java/org/z3950/zing/cql/CQLLexer.java index 83bbe5b..c285902 100644 --- a/src/main/java/org/z3950/zing/cql/CQLLexer.java +++ b/src/main/java/org/z3950/zing/cql/CQLLexer.java @@ -6,7 +6,7 @@ package org.z3950.zing.cql; /** - * + * Implementation of the CQL lexical syntax analyzer * @author jakub */ public class CQLLexer implements CQLTokenizer { diff --git a/src/main/java/org/z3950/zing/cql/CQLTokenizer.java b/src/main/java/org/z3950/zing/cql/CQLTokenizer.java index 4ab0702..0425bb4 100644 --- a/src/main/java/org/z3950/zing/cql/CQLTokenizer.java +++ b/src/main/java/org/z3950/zing/cql/CQLTokenizer.java @@ -6,7 +6,7 @@ package org.z3950.zing.cql; /** - * + * API bridge between the parser and lexer implementation * @author jakub */ public interface CQLTokenizer { @@ -25,14 +25,35 @@ public interface CQLTokenizer { public final static int TT_PROX = 1007; // The "prox" boolean public final static int TT_SORTBY = 1008; // The "sortby" operator + /** + * Consume next input token + */ public void move(); + /** + * Return the value of the last consumed token + * @return value of the token + */ public String value(); + /** + * Return the type of the last consumed token + * @return last consumed token + */ public int what(); + /** + * Render the type and value of the last consumed token + * @return human-readable string + */ public String render(); + /** + * Render specified token type + * @param what token type + * @param quote true, if single characters should be quoted for readability + * @return human-readable string + */ public String render(int what, boolean quote); public int pos(); -- 1.7.10.4