Tabnine Logo
org.anarres.cpp
Code IndexAdd Tabnine to your IDE (free)

How to use org.anarres.cpp

Best Java code snippets using org.anarres.cpp (Showing top 20 results out of 315)

origin: nativelibs4java/JNAerator

@Override
/* pp */ void init(Preprocessor pp) {
  super.init(pp);
  this.digraphs = pp.getFeature(Feature.DIGRAPHS);
  this.reader.init(pp, this);
}
origin: shevek/jcpp

protected void warning(int line, int column, String msg)
    throws LexerException {
  if (werror)
    error(line, column, msg);
  else if (listener != null)
    listener.handleWarning(this, line, column, msg);
  else
    throw new LexerException("Warning at " + line + ":" + column + ": " + msg);
}
origin: nativelibs4java/JNAerator

/**
 * Handles an error.
 *
 * If a PreprocessorListener is installed, it receives the
 * error. Otherwise, an exception is thrown.
 *
 * @see #error(int, int, String)
 */
protected void error(Token tok, String msg)
          throws LexerException {
  error(tok.getLine(), tok.getColumn(), msg);
}
origin: nativelibs4java/JNAerator

/* pp */ void init(Preprocessor pp, LexerSource s) {
  this.listener = pp.getListener();
  this.source = s;
  setTrigraphs(pp.getFeature(Feature.TRIGRAPHS),
          pp.getWarning(Warning.TRIGRAPHS));
}
origin: nativelibs4java/JNAerator

private boolean testError(Preprocessor p)
          throws LexerException,
              IOException {
  for (;;) {
    Token    tok = p.token();
    if (tok.getType() == EOF)
      break;
    if (tok.getType() == INVALID)
      return true;
  }
  return false;
}
origin: com.nativelibs4java/anarres-jnaerator

/**
 * Adds input for the Preprocessor.
 *
 * @see #addInput(Source)
 */
public void addInput(File file)
          throws IOException {
  addInput(new FileLexerSource(file));
}
origin: nativelibs4java/JNAerator

/**
 * Returns true if the enclosed Source has more tokens.
 *
 * The EOF token is never returned by the iterator.
 * @throws IllegalStateException if the Source
 *        throws a LexerException or IOException
 */
public boolean hasNext() {
  advance();
  return tok.getType() != EOF;
}
origin: nativelibs4java/JNAerator

private Token cond(char c, int yes, int no)
          throws IOException,
              LexerException {
  int	d = read();
  if (c == d)
    return new Token(yes);
  unread(d);
  return new Token(no);
}
origin: nativelibs4java/JNAerator

/**
 * Handles a warning.
 *
 * If a PreprocessorListener is installed, it receives the
 * warning. Otherwise, an exception is thrown.
 *
 * @see #warning(int, int, String)
 */
protected void warning(Token tok, String msg)
          throws LexerException {
  warning(tok.getLine(), tok.getColumn(), msg);
}
origin: nativelibs4java/JNAerator

protected void warning(String msg)
          throws LexerException {
  if (source != null)
    source.warning(msg);
  else
    throw new LexerException(msg);
}
origin: nativelibs4java/JNAerator

protected void error(int line, int column, String msg)
          throws LexerException {
  if (listener != null)
    listener.handleError(this, line, column, msg);
  else
    throw new LexerException("Error at " + line + ":" + column + ": " + msg);
}
origin: nativelibs4java/JNAerator

@Override
public Token token()
          throws IOException,
              LexerException {
  throw new LexerException("Cannot read from " + getName());
}
@Override
origin: nativelibs4java/JNAerator

public void close()
          throws IOException {
  if (reader != null) {
    reader.close();
    reader = null;
  }
  super.close();
}
origin: com.nativelibs4java/anarres-jnaerator

/* pp */ void init(Preprocessor pp, LexerSource s) {
  this.listener = pp.getListener();
  this.source = s;
  setTrigraphs(pp.getFeature(Feature.TRIGRAPHS),
          pp.getWarning(Warning.TRIGRAPHS));
}
origin: nativelibs4java/JNAerator

protected void warning(int line, int column, String msg)
          throws LexerException {
  if (werror)
    error(line, column, msg);
  else if (listener != null)
    listener.handleWarning(this, line, column, msg);
  else
    throw new LexerException("Warning at " + line + ":" + column + ": " + msg);
}
origin: nativelibs4java/JNAerator

/**
 * Adds input for the Preprocessor.
 *
 * @see #addInput(Source)
 */
public void addInput(File file)
          throws IOException {
  addInput(new FileLexerSource(file));
}
origin: shevek/jcpp

@Override
/* pp */ void init(Preprocessor pp) {
  super.init(pp);
  this.digraphs = pp.getFeature(Feature.DIGRAPHS);
  this.reader.init(pp, this);
}
origin: com.nativelibs4java/anarres-jnaerator

/**
 * Handles an error.
 *
 * If a PreprocessorListener is installed, it receives the
 * error. Otherwise, an exception is thrown.
 *
 * @see #error(int, int, String)
 */
protected void error(Token tok, String msg)
          throws LexerException {
  error(tok.getLine(), tok.getColumn(), msg);
}
origin: com.nativelibs4java/anarres-jnaerator

protected void warning(int line, int column, String msg)
          throws LexerException {
  if (werror)
    error(line, column, msg);
  else if (listener != null)
    listener.handleWarning(this, line, column, msg);
  else
    throw new LexerException("Warning at " + line + ":" + column + ": " + msg);
}
origin: com.nativelibs4java/anarres-jnaerator

@Override
/* pp */ void init(Preprocessor pp) {
  super.init(pp);
  this.digraphs = pp.getFeature(Feature.DIGRAPHS);
  this.reader.init(pp, this);
}
org.anarres.cpp

Most used classes

  • Preprocessor
    A C Preprocessor. The Preprocessor outputs a token stream which does not need re-lexing for C or C++
  • Token
    A Preprocessor token.
  • CppReader
    A Reader wrapper around the Preprocessor. This is a utility class to provide a transparent Readerwhi
  • StringLexerSource
    A Source for lexing a String. This class is used by token pasting, but can be used by user code.
  • VirtualFile
    An extremely lightweight virtual file interface.
  • JoinReader,
  • LexerSource,
  • Main,
  • PreprocessorListener,
  • Source,
  • LexerException,
  • Macro,
  • Argument,
  • BuildMetadata,
  • ChrootFileSystem$ChrootFile,
  • CppTask$Macro,
  • DefaultPreprocessorListener,
  • FileLexerSource,
  • FixedTokenSource
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