module Hydra.Ext.Java.Language where
import Hydra.All
import qualified Data.Set as S
javaLanguage :: Language m
javaLanguage :: forall m. Language m
javaLanguage = forall m. LanguageName -> LanguageConstraints m -> Language m
Language (String -> LanguageName
LanguageName String
"hydra/ext/java") forall a b. (a -> b) -> a -> b
$ LanguageConstraints {
languageConstraintsEliminationVariants :: Set EliminationVariant
languageConstraintsEliminationVariants = forall a. Ord a => [a] -> Set a
S.fromList [EliminationVariant]
eliminationVariants,
languageConstraintsLiteralVariants :: Set LiteralVariant
languageConstraintsLiteralVariants = forall a. Ord a => [a] -> Set a
S.fromList [
LiteralVariant
LiteralVariantBoolean,
LiteralVariant
LiteralVariantFloat,
LiteralVariant
LiteralVariantInteger,
LiteralVariant
LiteralVariantString],
languageConstraintsFloatTypes :: Set FloatType
languageConstraintsFloatTypes = forall a. Ord a => [a] -> Set a
S.fromList [
FloatType
FloatTypeFloat32,
FloatType
FloatTypeFloat64],
languageConstraintsFunctionVariants :: Set FunctionVariant
languageConstraintsFunctionVariants = forall a. Ord a => [a] -> Set a
S.fromList [FunctionVariant]
functionVariants,
languageConstraintsIntegerTypes :: Set IntegerType
languageConstraintsIntegerTypes = forall a. Ord a => [a] -> Set a
S.fromList [
IntegerType
IntegerTypeBigint,
IntegerType
IntegerTypeInt16,
IntegerType
IntegerTypeInt32,
IntegerType
IntegerTypeInt64,
IntegerType
IntegerTypeUint8,
IntegerType
IntegerTypeUint16],
languageConstraintsTermVariants :: Set TermVariant
languageConstraintsTermVariants = forall a. Ord a => [a] -> Set a
S.fromList [
TermVariant
TermVariantApplication,
TermVariant
TermVariantElement,
TermVariant
TermVariantFunction,
TermVariant
TermVariantList,
TermVariant
TermVariantLiteral,
TermVariant
TermVariantMap,
TermVariant
TermVariantNominal,
TermVariant
TermVariantOptional,
TermVariant
TermVariantRecord,
TermVariant
TermVariantSet,
TermVariant
TermVariantUnion,
TermVariant
TermVariantVariable],
languageConstraintsTypeVariants :: Set TypeVariant
languageConstraintsTypeVariants = forall a. Ord a => [a] -> Set a
S.fromList [
TypeVariant
TypeVariantAnnotated,
TypeVariant
TypeVariantApplication,
TypeVariant
TypeVariantElement,
TypeVariant
TypeVariantFunction,
TypeVariant
TypeVariantLambda,
TypeVariant
TypeVariantList,
TypeVariant
TypeVariantLiteral,
TypeVariant
TypeVariantMap,
TypeVariant
TypeVariantNominal,
TypeVariant
TypeVariantOptional,
TypeVariant
TypeVariantRecord,
TypeVariant
TypeVariantSet,
TypeVariant
TypeVariantUnion,
TypeVariant
TypeVariantVariable],
languageConstraintsTypes :: Type m -> Bool
languageConstraintsTypes = forall a b. a -> b -> a
const Bool
True }
reservedWords :: S.Set String
reservedWords :: Set String
reservedWords = forall a. Ord a => [a] -> Set a
S.fromList forall a b. (a -> b) -> a -> b
$ [String]
specialNames forall a. [a] -> [a] -> [a]
++ [String]
classNames forall a. [a] -> [a] -> [a]
++ [String]
keywords forall a. [a] -> [a] -> [a]
++ [String]
literals
where
specialNames :: [String]
specialNames = [String
"Elements"]
classNames :: [String]
classNames = [
String
"AbstractMethodError", String
"Appendable", String
"ArithmeticException", String
"ArrayIndexOutOfBoundsException",
String
"ArrayStoreException", String
"AssertionError", String
"AutoCloseable", String
"Boolean", String
"BootstrapMethodError", String
"Byte",
String
"CharSequence", String
"Character", String
"Class", String
"ClassCastException", String
"ClassCircularityError", String
"ClassFormatError",
String
"ClassLoader", String
"ClassNotFoundException", String
"ClassValue", String
"CloneNotSupportedException", String
"Cloneable", String
"Comparable",
String
"Compiler", String
"Deprecated", String
"Double", String
"Enum", String
"EnumConstantNotPresentException", String
"Error", String
"Exception",
String
"ExceptionInInitializerError", String
"Float", String
"IllegalAccessError", String
"IllegalAccessException",
String
"IllegalArgumentException", String
"IllegalMonitorStateException", String
"IllegalStateException",
String
"IllegalThreadStateException", String
"IncompatibleClassChangeError", String
"IndexOutOfBoundsException",
String
"InheritableThreadLocal", String
"InstantiationError", String
"InstantiationException", String
"Integer", String
"InternalError",
String
"InterruptedException", String
"Iterable", String
"LinkageError", String
"Long", String
"Math", String
"NegativeArraySizeException",
String
"NoClassDefFoundError", String
"NoSuchFieldError", String
"NoSuchFieldException", String
"NoSuchMethodError", String
"NoSuchMethodException",
String
"NullPointerException", String
"Number", String
"NumberFormatException", String
"Object", String
"OutOfMemoryError", String
"Override", String
"Package",
String
"Process", String
"ProcessBuilder", String
"Readable", String
"ReflectiveOperationException", String
"Runnable", String
"Runtime",
String
"RuntimeException", String
"RuntimePermission", String
"SafeVarargs", String
"SecurityException", String
"SecurityManager", String
"Short",
String
"StackOverflowError", String
"StackTraceElement", String
"StrictMath", String
"String", String
"StringBuffer", String
"StringBuilder",
String
"StringIndexOutOfBoundsException", String
"SuppressWarnings", String
"System", String
"Thread", String
"ThreadDeath",
String
"ThreadGroup", String
"ThreadLocal", String
"Throwable", String
"TypeNotPresentException",
String
"UnknownError", String
"UnsatisfiedLinkError", String
"UnsupportedClassVersionError",
String
"UnsupportedOperationException", String
"VerifyError", String
"VirtualMachineError", String
"Void"]
keywords :: [String]
keywords = [
String
"abstract", String
"assert", String
"boolean", String
"break", String
"byte", String
"case", String
"catch", String
"char", String
"class", String
"const", String
"continue",
String
"default", String
"do", String
"double", String
"else", String
"enum", String
"extends", String
"final", String
"finally", String
"float", String
"for", String
"goto", String
"if",
String
"implements", String
"import", String
"instanceof", String
"int", String
"interface", String
"long", String
"native", String
"new", String
"package", String
"private",
String
"protected", String
"public", String
"return", String
"short", String
"static", String
"strictfp", String
"super", String
"switch", String
"synchronized", String
"this",
String
"throw", String
"throws", String
"transient", String
"try", String
"void", String
"volatile", String
"while"]
literals :: [String]
literals = [String
"false", String
"null", String
"true"]