Module dev.civl.abc

Class TokenUtils

java.lang.Object
dev.civl.abc.token.IF.TokenUtils

public class TokenUtils extends Object
Utility class providing static methods dealing with Token objects.
  • Field Details

    • eofToken

      public static final org.antlr.runtime.Token eofToken
  • Constructor Details

    • TokenUtils

      public TokenUtils()
  • Method Details

    • getShortFilename

      public static String getShortFilename(org.antlr.runtime.Token token, boolean abbreviated)
      Computes a short version of the file name from a token's source file.
      Parameters:
      token - a token
      abbreviated - true iff the result is an abbreviated file name, i.e., shorter file name, which is calculated by the static hash map.
      Returns:
      the short file name
    • makeTokenSourceFromList

      public static org.antlr.runtime.TokenSource makeTokenSourceFromList(CivlcToken first)