class Symbols extends AnyRef
To encode non-ASCII characters ("symbols") in strings, Isabelle uses a proprietary encoding which
encodes a symbol as a substring \<name>
where name
is the name of the substring. (Thus, strings
containing symbols are ASCII strings.)
There is a loose correspondence between symbols and Unicode codepositions that
is documented in a machine readable format in etc/symbols
in the Isabelle distribution.
This class translates between Isabelle's encoding and Unicode strings.
If the default values for this class's constructor are appropriate, consider using the static functions Symbols.symbolsToUnicode and Symbols.unicodeToSymbols instead of instantiating this class.
- Source
- Symbols.scala
- Alphabetic
- By Inheritance
- Symbols
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Symbols(symbolsFile: URL = classOf[Symbols].getResource("symbols"), extraSymbols: Iterable[(String, Int)] = Nil)
- symbolsFile
Location of the
symbols
that specifies the correspondence. Default:symbols
file from Isabelle2020 (bundled with this library).- extraSymbols
Additional symbol name / codepoint pairs to use in addition to those in the
symbols
file.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def symbolsToUnicode(str: String, failUnknown: Boolean = false): String
Converts a string in Isabelle's encoding to Unicode.
Converts a string in Isabelle's encoding to Unicode.
- failUnknown
If true, unknown symbols cause a CharConversionException. If false, unknown symbols are left unchanged in the string.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unicodeToSymbols(str: String, failUnknown: Boolean = false): String
Converts a Unicode string to a string using Isabelle's symbol encoding.
Converts a Unicode string to a string using Isabelle's symbol encoding.
- failUnknown
If true, unknown Unicode characters cause a CharConversionException. If false, unknown Unicode characters are encoded as
\<unicodeX>
whereX
is the code position in uppercase hex. (Without leading zeros.)
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])