Tabnine Logo
ANTLRHashString
Code IndexAdd Tabnine to your IDE (free)

How to use
ANTLRHashString
in
antlr

Best Java code snippets using antlr.ANTLRHashString (Showing top 20 results out of 468)

origin: jenkinsci/jenkins

public CrontabLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(true);
  literals = new Hashtable();
  literals.put(new ANTLRHashString(")", this), new Integer(19));
  literals.put(new ANTLRHashString(",", this), new Integer(13));
  literals.put(new ANTLRHashString("/", this), new Integer(15));
  literals.put(new ANTLRHashString("yearly", this), new Integer(6));
  literals.put(new ANTLRHashString("midnight", this), new Integer(11));
  literals.put(new ANTLRHashString("*", this), new Integer(16));
  literals.put(new ANTLRHashString("-", this), new Integer(14));
  literals.put(new ANTLRHashString("annually", this), new Integer(7));
  literals.put(new ANTLRHashString("H", this), new Integer(17));
  literals.put(new ANTLRHashString("weekly", this), new Integer(9));
  literals.put(new ANTLRHashString("(", this), new Integer(18));
  literals.put(new ANTLRHashString("daily", this), new Integer(10));
  literals.put(new ANTLRHashString("hourly", this), new Integer(12));
  literals.put(new ANTLRHashString("monthly", this), new Integer(8));
}

origin: org.glassfish.external/antlr

  s = new ANTLRHashString((String)o, lexer);
int l = length();
if (s.length() != l) {
  return false;
    if (charAt(i) != s.charAt(i)) {
      return false;
    if (lexer.toLower(charAt(i)) != lexer.toLower(s.charAt(i))) {
      return false;
origin: org.glassfish.external/antlr

public ANTLRHashString(char[] buf, int length, CharScanner lexer) {
  this.lexer = lexer;
  setBuffer(buf, length);
}
origin: org.glassfish.external/antlr

public int hashCode() {
  int hashval = 0;
  int l = length();
  if (lexer.getCaseSensitiveLiterals()) {
    for (int i = 0; i < l; i++) {
      hashval = hashval * prime + charAt(i);
    }
  }
  else {
    for (int i = 0; i < l; i++) {
      hashval = hashval * prime + lexer.toLower(charAt(i));
    }
  }
  return hashval;
}
origin: org.glassfish.external/antlr

public int testLiteralsTable(int ttype) {
  hashString.setBuffer(text.getBuffer(), text.length());
  Integer literalsIndex = (Integer)literals.get(hashString);
  if (literalsIndex != null) {
    ttype = literalsIndex.intValue();
  }
  return ttype;
}
origin: hibernate/hibernate-orm

public GeneratedOrderByLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = false;
  setCaseSensitive(false);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("asc", this), new Integer(14));
  literals.put(new ANTLRHashString("desc", this), new Integer(15));
  literals.put(new ANTLRHashString("descending", this), new Integer(30));
  literals.put(new ANTLRHashString("nulls", this), new Integer(16));
  literals.put(new ANTLRHashString("collate", this), new Integer(13));
  literals.put(new ANTLRHashString("ascending", this), new Integer(29));
}

origin: notzippy/JALOPY2-MAIN

/**
 * Test the token type against the literals table.
 *
 * @param ttype recognized token type.
 *
 * @return token type.
 */
public int testLiteralsTable(int ttype)
{
  this.hashString.setBuffer(text.getBuffer(), text.length());
  Integer literalsIndex = (Integer)literals.get(hashString);
  if (literalsIndex != null)
  {
    ttype = literalsIndex.intValue();
    switch (ttype)
    {
      case JavaTokenTypes.LITERAL_assert:
        switch (this.sourceVersion)
        {
          case JDK_1_3:
            ttype = JavaTokenTypes.IDENT;
            break;
        }
        break;
    }
  }
  return ttype;
}
origin: checkstyle/checkstyle

setCaseSensitive(true);
literals = new Hashtable();
literals.put(new ANTLRHashString("byte", this), new Integer(51));
literals.put(new ANTLRHashString("public", this), new Integer(62));
literals.put(new ANTLRHashString("case", this), new Integer(93));
literals.put(new ANTLRHashString("short", this), new Integer(53));
literals.put(new ANTLRHashString("break", this), new Integer(86));
literals.put(new ANTLRHashString("while", this), new Integer(84));
literals.put(new ANTLRHashString("new", this), new Integer(136));
literals.put(new ANTLRHashString("instanceof", this), new Integer(121));
literals.put(new ANTLRHashString("implements", this), new Integer(75));
literals.put(new ANTLRHashString("synchronized", this), new Integer(67));
literals.put(new ANTLRHashString("float", this), new Integer(55));
literals.put(new ANTLRHashString("package", this), new Integer(44));
literals.put(new ANTLRHashString("return", this), new Integer(88));
literals.put(new ANTLRHashString("throw", this), new Integer(90));
literals.put(new ANTLRHashString("null", this), new Integer(135));
literals.put(new ANTLRHashString("protected", this), new Integer(63));
literals.put(new ANTLRHashString("class", this), new Integer(69));
literals.put(new ANTLRHashString("throws", this), new Integer(81));
literals.put(new ANTLRHashString("do", this), new Integer(85));
literals.put(new ANTLRHashString("strictfp", this), new Integer(41));
literals.put(new ANTLRHashString("super", this), new Integer(79));
literals.put(new ANTLRHashString("transient", this), new Integer(65));
literals.put(new ANTLRHashString("native", this), new Integer(66));
literals.put(new ANTLRHashString("interface", this), new Integer(71));
literals.put(new ANTLRHashString("final", this), new Integer(39));
literals.put(new ANTLRHashString("if", this), new Integer(83));
literals.put(new ANTLRHashString("double", this), new Integer(57));
origin: hibernate/hibernate-orm

setCaseSensitive(false);
literals = new Hashtable();
literals.put(new ANTLRHashString("between", this), new Integer(10));
literals.put(new ANTLRHashString("case", this), new Integer(56));
literals.put(new ANTLRHashString("delete", this), new Integer(13));
literals.put(new ANTLRHashString("new", this), new Integer(37));
literals.put(new ANTLRHashString("end", this), new Integer(57));
literals.put(new ANTLRHashString("object", this), new Integer(67));
literals.put(new ANTLRHashString("insert", this), new Integer(29));
literals.put(new ANTLRHashString("distinct", this), new Integer(16));
literals.put(new ANTLRHashString("where", this), new Integer(52));
literals.put(new ANTLRHashString("trailing", this), new Integer(69));
literals.put(new ANTLRHashString("then", this), new Integer(59));
literals.put(new ANTLRHashString("select", this), new Integer(45));
literals.put(new ANTLRHashString("and", this), new Integer(6));
literals.put(new ANTLRHashString("outer", this), new Integer(42));
literals.put(new ANTLRHashString("not", this), new Integer(38));
literals.put(new ANTLRHashString("fetch", this), new Integer(21));
literals.put(new ANTLRHashString("from", this), new Integer(22));
literals.put(new ANTLRHashString("null", this), new Integer(39));
literals.put(new ANTLRHashString("count", this), new Integer(12));
literals.put(new ANTLRHashString("like", this), new Integer(34));
literals.put(new ANTLRHashString("when", this), new Integer(60));
literals.put(new ANTLRHashString("class", this), new Integer(11));
literals.put(new ANTLRHashString("inner", this), new Integer(28));
literals.put(new ANTLRHashString("leading", this), new Integer(65));
literals.put(new ANTLRHashString("with", this), new Integer(62));
literals.put(new ANTLRHashString("set", this), new Integer(46));
literals.put(new ANTLRHashString("escape", this), new Integer(18));
origin: apache/geode

setCaseSensitive(false);
literals = new Hashtable();
literals.put(new ANTLRHashString("type", this), new Integer(79));
literals.put(new ANTLRHashString("byte", this), new Integer(132));
literals.put(new ANTLRHashString("list", this), new Integer(123));
literals.put(new ANTLRHashString("undefine", this), new Integer(73));
literals.put(new ANTLRHashString("time", this), new Integer(136));
literals.put(new ANTLRHashString("short", this), new Integer(124));
literals.put(new ANTLRHashString("dictionary", this), new Integer(140));
literals.put(new ANTLRHashString("listtoset", this), new Integer(104));
literals.put(new ANTLRHashString("abs", this), new Integer(102));
literals.put(new ANTLRHashString("timestamp", this), new Integer(138));
literals.put(new ANTLRHashString("limit", this), new Integer(81));
literals.put(new ANTLRHashString("distinct", this), new Integer(75));
literals.put(new ANTLRHashString("octet", this), new Integer(133));
literals.put(new ANTLRHashString("where", this), new Integer(80));
literals.put(new ANTLRHashString("orelse", this), new Integer(90));
literals.put(new ANTLRHashString("select", this), new Integer(74));
literals.put(new ANTLRHashString("and", this), new Integer(91));
literals.put(new ANTLRHashString("float", this), new Integer(127));
literals.put(new ANTLRHashString("not", this), new Integer(103));
literals.put(new ANTLRHashString("interval", this), new Integer(137));
literals.put(new ANTLRHashString("date", this), new Integer(135));
literals.put(new ANTLRHashString("from", this), new Integer(77));
literals.put(new ANTLRHashString("null", this), new Integer(143));
literals.put(new ANTLRHashString("flatten", this), new Integer(106));
literals.put(new ANTLRHashString("count", this), new Integer(116));
literals.put(new ANTLRHashString("last", this), new Integer(110));
literals.put(new ANTLRHashString("query", this), new Integer(72));
origin: org.glassfish.external/antlr

/** Test the text passed in against the literals table
 * Override this method to perform a different literals test
 * This is used primarily when you want to test a portion of
 * a token.
 */
public int testLiteralsTable(String text, int ttype) {
  ANTLRHashString s = new ANTLRHashString(text, this);
  Integer literalsIndex = (Integer)literals.get(s);
  if (literalsIndex != null) {
    ttype = literalsIndex.intValue();
  }
  return ttype;
}
origin: org.hibernate/com.springsource.org.hibernate.core

public GeneratedOrderByLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = false;
  setCaseSensitive(false);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("asc", this), new Integer(13));
  literals.put(new ANTLRHashString("ascending", this), new Integer(25));
  literals.put(new ANTLRHashString("collate", this), new Integer(12));
  literals.put(new ANTLRHashString("descending", this), new Integer(26));
  literals.put(new ANTLRHashString("desc", this), new Integer(14));
}

origin: org.hibernate/com.springsource.org.hibernate

public GeneratedOrderByLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = false;
  setCaseSensitive(false);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("asc", this), new Integer(13));
  literals.put(new ANTLRHashString("ascending", this), new Integer(25));
  literals.put(new ANTLRHashString("collate", this), new Integer(12));
  literals.put(new ANTLRHashString("descending", this), new Integer(26));
  literals.put(new ANTLRHashString("desc", this), new Integer(14));
}

origin: org.opensourcebim/buildingsmartlibrary

private void addNewLiteral(String literalName, int key) {
  this.literals.put(new ANTLRHashString(literalName, this), new Integer(key));
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

public GroupLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(true);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("default", this), new Integer(21));
  literals.put(new ANTLRHashString("group", this), new Integer(4));
  literals.put(new ANTLRHashString("implements", this), new Integer(7));
}

origin: struts/struts

public ValidWhenLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(false);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("null", this), new Integer(11));
  literals.put(new ANTLRHashString("or", this), new Integer(16));
  literals.put(new ANTLRHashString("and", this), new Integer(15));
}
 
origin: org.apache.struts/struts-core

public ValidWhenLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(false);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("null", this), new Integer(11));
  literals.put(new ANTLRHashString("or", this), new Integer(16));
  literals.put(new ANTLRHashString("and", this), new Integer(15));
}
 
origin: antlr/antlr3

public GroupLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(true);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("default", this), new Integer(21));
  literals.put(new ANTLRHashString("group", this), new Integer(4));
  literals.put(new ANTLRHashString("implements", this), new Integer(7));
}

origin: jasperreports/jasperreports

public MappingLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(false);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("Columns", this), new Integer(7));
  literals.put(new ANTLRHashString("Data", this), new Integer(12));
  literals.put(new ANTLRHashString("Chapters", this), new Integer(10));
  literals.put(new ANTLRHashString("Rows", this), new Integer(8));
  literals.put(new ANTLRHashString("Sections", this), new Integer(11));
  literals.put(new ANTLRHashString("FormattedData", this), new Integer(13));
  literals.put(new ANTLRHashString("Axis", this), new Integer(4));
  literals.put(new ANTLRHashString("Pages", this), new Integer(9));
}
 
origin: org.springmodules/spring-modules-validation

public ValidWhenLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(false);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("null", this), new Integer(10));
  literals.put(new ANTLRHashString("or", this), new Integer(15));
  literals.put(new ANTLRHashString("and", this), new Integer(14));
}
antlrANTLRHashString

Most used methods

  • <init>
  • setBuffer
  • charAt
  • length
  • setString

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Collectors (java.util.stream)
  • JLabel (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now