Codota Logo
Scanner
Code IndexAdd Codota to your IDE (free)

How to use
Scanner
in
com.oracle.truffle.dsl.processor.expression

Best Java code snippets using com.oracle.truffle.dsl.processor.expression.Scanner (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: com.oracle.truffle/truffle-dsl-processor

void AddCh() {
  if (tlen >= tval.length) {
    char[] newBuf = new char[2 * tval.length];
    System.arraycopy(tval, 0, newBuf, 0, tval.length);
    tval = newBuf;
  }
  if (ch != Buffer.EOF) {
    tval[tlen++] = (char)ch;
    NextCh();
  }
}
origin: com.oracle.truffle/truffle-dsl-processor

public Token Scan() {
  if (tokens.next == null) {
    return NextToken();
  } else {
    pt = tokens = tokens.next;
    return tokens;
  }
}
origin: com.oracle/truffle-dsl-processor

void Get() {
  for (;;) {
    t = la;
    la = scanner.Scan();
    if (la.kind <= maxT) {
      ++errDist;
      break;
    }
    la = t;
  }
}
origin: com.oracle.truffle/truffle-dsl-processor

Token NextToken() {
  while (ch == ' ' ||
    false
  ) NextCh();
  int state = start.state(ch);
  tlen = 0;
  AddCh();
        if (recKind != noSym) {
          tlen = recEnd - t.pos;
          SetScannerBehindT();
        if (ch == '$' || ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'Z' || ch == '_' || ch >= 'a' && ch <= 'z') {AddCh(); state = 1; break;}
        else {t.kind = 1; break loop;}
      case 2:
        recEnd = pos; recKind = 2;
        if (ch >= '0' && ch <= '7') {AddCh(); state = 5; break;}
        else if (ch == 'x') {AddCh(); state = 3; break;}
        else if (ch == 'b') {AddCh(); state = 4; break;}
        else {t.kind = 2; break loop;}
      case 3:
        recEnd = pos; recKind = 2;
        if (ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'F' || ch >= 'a' && ch <= 'f') {AddCh(); state = 3; break;}
        else {t.kind = 2; break loop;}
      case 4:
        recEnd = pos; recKind = 2;
        if (ch >= '0' && ch <= '1') {AddCh(); state = 4; break;}
        else {t.kind = 2; break loop;}
      case 5:
origin: com.oracle.truffle/truffle-dsl-processor

public Scanner(InputStream s) {
  buffer = new Buffer(s);
  Init();
}
origin: com.oracle.truffle/truffle-dsl-processor

public Parser(InputStream input) {
  this.scanner = new Scanner(input);
  errors = new Errors();
}
origin: com.oracle/truffle-dsl-processor

Token NextToken() {
  while (ch == ' ' ||
    false
  ) NextCh();
  int state = start.state(ch);
  tlen = 0;
  AddCh();
        if (recKind != noSym) {
          tlen = recEnd - t.pos;
          SetScannerBehindT();
        if (ch == '$' || ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'Z' || ch == '_' || ch >= 'a' && ch <= 'z') {AddCh(); state = 1; break;}
        else {t.kind = 1; break loop;}
      case 2:
        recEnd = pos; recKind = 2;
        if (ch >= '0' && ch <= '7') {AddCh(); state = 5; break;}
        else if (ch == 'x') {AddCh(); state = 3; break;}
        else if (ch == 'b') {AddCh(); state = 4; break;}
        else {t.kind = 2; break loop;}
      case 3:
        recEnd = pos; recKind = 2;
        if (ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'F' || ch >= 'a' && ch <= 'f') {AddCh(); state = 3; break;}
        else {t.kind = 2; break loop;}
      case 4:
        recEnd = pos; recKind = 2;
        if (ch >= '0' && ch <= '1') {AddCh(); state = 4; break;}
        else {t.kind = 2; break loop;}
      case 5:
origin: com.oracle.truffle/truffle-dsl-processor

public Scanner(String fileName) {
  buffer = new Buffer(fileName);
  Init();
}
origin: com.oracle/truffle-dsl-processor

public Parser(InputStream input) {
  this.scanner = new Scanner(input);
  errors = new Errors();
}
origin: com.oracle/truffle-dsl-processor

void AddCh() {
  if (tlen >= tval.length) {
    char[] newBuf = new char[2 * tval.length];
    System.arraycopy(tval, 0, newBuf, 0, tval.length);
    tval = newBuf;
  }
  if (ch != Buffer.EOF) {
    tval[tlen++] = (char)ch;
    NextCh();
  }
}
origin: com.oracle.truffle/truffle-dsl-processor

public Token Peek() {
  do {
    if (pt.next == null) {
      pt.next = NextToken();
    }
    pt = pt.next;
  } while (pt.kind > maxT); // skip pragmas
  return pt;
}
origin: com.oracle/truffle-dsl-processor

public Scanner(String fileName) {
  buffer = new Buffer(fileName);
  Init();
}
origin: com.oracle.truffle/truffle-dsl-processor

void Get() {
  for (;;) {
    t = la;
    la = scanner.Scan();
    if (la.kind <= maxT) {
      ++errDist;
      break;
    }
    la = t;
  }
}
origin: com.oracle/truffle-dsl-processor

private void SetScannerBehindT() {
  buffer.setPos(t.pos);
  NextCh();
  line = t.line;
  col = t.col;
  charPos = t.charPos;
  for (int i = 0; i < tlen; i++)
    NextCh();
}
origin: com.oracle/truffle-dsl-processor

public Token Peek() {
  do {
    if (pt.next == null) {
      pt.next = NextToken();
    }
    pt = pt.next;
  } while (pt.kind > maxT); // skip pragmas
  return pt;
}
origin: com.oracle/truffle-dsl-processor

public Scanner(InputStream s) {
  buffer = new Buffer(s);
  Init();
}
origin: com.oracle.truffle/truffle-dsl-processor

private void SetScannerBehindT() {
  buffer.setPos(t.pos);
  NextCh();
  line = t.line;
  col = t.col;
  charPos = t.charPos;
  for (int i = 0; i < tlen; i++)
    NextCh();
}
origin: com.oracle/truffle-dsl-processor

public Token Scan() {
  if (tokens.next == null) {
    return NextToken();
  } else {
    pt = tokens = tokens.next;
    return tokens;
  }
}
origin: com.oracle.truffle/truffle-dsl-processor

void Init() {
  pos = -1;
  line = 1;
  col = 0;
  charPos = -1;
  oldEols = 0;
  NextCh();
  if (ch == 0xEF) { // check optional byte order mark for UTF-8
    NextCh();
    int ch1 = ch;
    NextCh();
    int ch2 = ch;
    if (ch1 != 0xBB || ch2 != 0xBF) {
      throw new FatalError("Illegal byte order mark at start of file");
    }
    buffer = new UTF8Buffer(buffer);
    col = 0;
    charPos = -1;
    NextCh();
  }
  pt = tokens = new Token(); // first token is a dummy
}
origin: com.oracle/truffle-dsl-processor

void Init() {
  pos = -1;
  line = 1;
  col = 0;
  charPos = -1;
  oldEols = 0;
  NextCh();
  if (ch == 0xEF) { // check optional byte order mark for UTF-8
    NextCh();
    int ch1 = ch;
    NextCh();
    int ch2 = ch;
    if (ch1 != 0xBB || ch2 != 0xBF) {
      throw new FatalError("Illegal byte order mark at start of file");
    }
    buffer = new UTF8Buffer(buffer);
    col = 0;
    charPos = -1;
    NextCh();
  }
  pt = tokens = new Token(); // first token is a dummy
}
com.oracle.truffle.dsl.processor.expressionScanner

Most used methods

  • <init>
  • AddCh
  • Init
  • NextCh
  • NextToken
  • Scan
  • SetScannerBehindT

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now