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
- All
Instance Constructors
-
new
Symbols(symbolsFile: URL = ..., extraSymbols: Iterable[(String, Int)] = Nil, extraSymbolsLowPri: Iterable[(String, Int)] = Nil, processSubSuper: ProcessSubSuperMode = ProcessSubSuperMode.Yes)
- symbolsFile
Location of the
symbolsthat specifies the correspondence. Default:symbolsfile from Isabelle2020 (bundled with this library).- extraSymbols
Additional symbol name / codepoint pairs to use in addition to those in the
symbolsfile. When converting from Unicode to symbols, these mappings have higher priority than the ones fromsymbolsFile.- extraSymbolsLowPri
Additional symbol name / codepoint pairs to use in addition to those in the
symbolsfile. When converting from Unicode to symbols, these mappings have lower priority than the ones fromsymbolsFile.- processSubSuper
Whether to process ⇩ and ⇧ symbols (on the Isabelle side) into/from subscript/superscript symbols in Unicode. (for those letters that have Unicode subscript/superscript symbols)
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( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- 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>whereXis the code position in uppercase hex. (Without leading zeros.)
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )