Class Scanner

java.lang.Object
org.openjdk.asmtools.jasm.ParseBase
org.openjdk.asmtools.jasm.Scanner

public class Scanner extends ParseBase
A Scanner for Jasm tokens. Errors are reported to the environment object.

The scanner keeps track of the current token, the value of the current token (if any), and the start position of the current token.

The scan() method advances the scanner to the next token in the input.

The match() method is used to quickly match opening brackets (ie: '(', '{', or '[') with their closing counter part. This is useful during error recovery.

The compiler treats either "\n", "\r" or "\r\n" as the end of a line.

  • Field Details

    • in

      protected Environment in
      Input stream
    • ch

      protected int ch
      The current character
    • token

      protected JasmTokens.Token token
      Current token
    • pos

      protected int pos
      The position of the current token
    • charValue

      protected char charValue
    • intValue

      protected int intValue
    • longValue

      protected long longValue
    • floatValue

      protected float floatValue
    • doubleValue

      protected double doubleValue
    • stringValue

      protected String stringValue
    • idValue

      protected String idValue
    • radix

      protected int radix
    • docComment

      protected String docComment
    • prevPos

      protected int prevPos
      The position of the previous token
    • sign

      protected int sign
    • inBits

      protected boolean inBits
  • Constructor Details

  • Method Details