Tabnine Logo
MismatchedCharException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
antlr.MismatchedCharException
constructor

Best Java code snippets using antlr.MismatchedCharException.<init> (Showing top 8 results out of 315)

origin: org.glassfish.external/antlr

public void match(String s) throws MismatchedCharException, CharStreamException {
  int len = s.length();
  for (int i = 0; i < len; i++) {
    if (LA(1) != s.charAt(i)) {
      throw new MismatchedCharException(LA(1), s.charAt(i), false, this);
    }
    consume();
  }
}
origin: org.glassfish.external/antlr

public void match(char c) throws MismatchedCharException, CharStreamException {
  if (LA(1) != c) {
    throw new MismatchedCharException(LA(1), c, false, this);
  }
  consume();
}
origin: org.glassfish.external/antlr

public void matchNot(char c) throws MismatchedCharException, CharStreamException {
  if (LA(1) == c) {
    throw new MismatchedCharException(LA(1), c, true, this);
  }
  consume();
}
origin: org.glassfish.external/antlr

public void match(BitSet b) throws MismatchedCharException, CharStreamException {
  if (!b.member(LA(1))) {
    throw new MismatchedCharException(LA(1), b, false, this);
  }
  else {
    consume();
  }
}
origin: org.glassfish.external/antlr

public void matchRange(char c1, char c2) throws MismatchedCharException, CharStreamException {
  if (LA(1) < c1 || LA(1) > c2) throw new MismatchedCharException(LA(1), c1, c2, false, this);
  consume();
}
origin: org.codehaus.groovy/groovy-jdk14

protected final void mSTRING_NL(boolean _createToken,
  boolean allowNewline
) throws RecognitionException, CharStreamException, TokenStreamException {
  int _ttype; Token _token=null; int _begin=text.length();
  _ttype = STRING_NL;
  int _saveIndex;
  
  if ( inputState.guessing==0 ) {
    if (!allowNewline) throw new MismatchedCharException('\n', '\n', true, this);
  }
  mONE_NL(false,false);
  if ( inputState.guessing==0 ) {
    text.setLength(_begin); text.append('\n');
  }
  if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
    _token = makeToken(_ttype);
    _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
  }
  _returnToken = _token;
}

origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

protected final void mSTRING_NL(boolean _createToken,
  boolean allowNewline
) throws RecognitionException, CharStreamException, TokenStreamException {
  int _ttype; Token _token=null; int _begin=text.length();
  _ttype = STRING_NL;
  int _saveIndex;
  
  if ( inputState.guessing==0 ) {
    if (!allowNewline) throw new MismatchedCharException('\n', '\n', true, this);
  }
  mONE_NL(false,false);
  if ( inputState.guessing==0 ) {
    text.setLength(_begin); text.append('\n');
  }
  if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
    _token = makeToken(_ttype);
    _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
  }
  _returnToken = _token;
}

origin: org.kohsuke.droovy/groovy

protected final void mSTRING_NL(boolean _createToken,
  boolean allowNewline
) throws RecognitionException, CharStreamException, TokenStreamException {
  int _ttype; Token _token=null; int _begin=text.length();
  _ttype = STRING_NL;
  int _saveIndex;
  
  if ( inputState.guessing==0 ) {
    if (!allowNewline) throw new MismatchedCharException('\n', '\n', true, this);
  }
  mONE_NL(false,false);
  if ( inputState.guessing==0 ) {
    text.setLength(_begin); text.append('\n');
  }
  if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
    _token = makeToken(_ttype);
    _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
  }
  _returnToken = _token;
}

antlrMismatchedCharException<init>

Javadoc

MismatchedCharException constructor comment.

Popular methods of MismatchedCharException

  • appendCharName
    Append a char to the msg buffer. If special, then show escaped version
  • getColumn
  • getLine

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Join (org.hibernate.mapping)
  • Top Sublime Text 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