Serialized Form

  • Package org.ek9lang.compiler

    • Class org.ek9lang.compiler.CompilableProgram

      class CompilableProgram extends Object implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • ek9Types
          Ek9Types ek9Types
          When the built-in ek9 bootstrap module is parsed and processed, it will be added here. This is so that basic built in types (which are immutable) can then be used within the compiler. This provides quick and programmatic access - while it would be possible to resolve within the normal scope hierarchy, this is quicker and more obvious within the compiler.
        • sourceToParsedModule
          Map<CompilableSource,ParsedModule> sourceToParsedModule
          It is important to maintain a quick mapping from source to parsed module.
        • theParsedModules
          Map<String,ParsedModules> theParsedModules
          For developer defined modules. Quick access via module name into the parsedModules that are recorded.
    • Class org.ek9lang.compiler.CompilableSource

      class CompilableSource extends Object implements Serializable
    • Class org.ek9lang.compiler.ParsedModule

      class ParsedModule extends Object implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • compilableProgram
          SharedThreadContext<CompilableProgram> compilableProgram
          The actual whole program, or set of programs that a developer is trying to develop.
        • ek9Types
          Ek9Types ek9Types
        • externallyImplemented
          boolean externallyImplemented
          Is the parsed module an EK9 implementation or externally linked. So the built-in EK9 types will be externally linked either java/jar or binary '*.so' for example. But there is a plugin mechanism - designed to enable third party 'adaptors' and binary linked code.
        • moduleName
          String moduleName
          The name of the module as defined in the EK9 source code. But remember this same module name can be used in other 'ParsedModules' any number of source files can make up a 'module' with a distinct name.
        • moduleScope
          ModuleScope moduleScope
        • source
          CompilableSource source
          The source file that is parsed module has loaded (or failed to load).
    • Class org.ek9lang.compiler.ParsedModules

      class ParsedModules extends Object implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • moduleName
          String moduleName
          The name of the module.
        • parsedModulesInModule
          List<ParsedModule> parsedModulesInModule
          The parsedModules that make up the whole module namespace.
  • Package org.ek9lang.compiler.common

  • Package org.ek9lang.compiler.support

  • Package org.ek9lang.compiler.symbols

    • Class org.ek9lang.compiler.symbols.AggregateSymbol

      class AggregateSymbol extends PossibleGenericSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • aggregateDescription
          String aggregateDescription
          Just used in commented output really - just handy to understand the origin of the aggregate as some are synthetic.
        • injectable
          boolean injectable
          Can this aggregate be injected by IOC/DI.
        • markedAsDispatcher
          boolean markedAsDispatcher
          If there is a method that acts as a dispatcher then this aggregate is also a dispatcher.
        • pipeSinkType
          String pipeSinkType
          When used in pipeline processing, what is the type this aggregate could support to receive types.
        • pipeSourceType
          String pipeSourceType
          When used in pipeline processing, what is the type this aggregate could support to create types.
        • subAggregateSymbols
          List<IAggregateSymbol> subAggregateSymbols
          Also keep a back pointer to the direct subclasses. This is really useful for analysing a class or a trait.
        • superAggregate
          IAggregateSymbol superAggregate
          Might be null if a base 'class' or 'interface', basically the 'super'.
    • Class org.ek9lang.compiler.symbols.AggregateWithTraitsSymbol

      class AggregateWithTraitsSymbol extends AggregateSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • allowOnly
          List<IAggregateSymbol> allowOnly
          The range of aggregates that are allowed to extend/implement this aggregate. Currently, used in a trait definition to limit the classes that can implement it. But could clearly be used elsewhere in the future.
        • traits
          List<AggregateWithTraitsSymbol> traits
          The range of traits this aggregate extends/implements.
    • Class org.ek9lang.compiler.symbols.CallSymbol

      class CallSymbol extends MethodSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • formOfDeclarationCall
          boolean formOfDeclarationCall
          Now dynamic functions are both calls at creation and calls when 'called'. So while I hate 'exceptions and one offs', functions are both a type and a thing to be called. We have to ensure we distinguish between the two.
        • resolvedSymbolToCall
          ScopedSymbol resolvedSymbolToCall
    • Class org.ek9lang.compiler.symbols.CaptureScope

      class CaptureScope extends LocalScope implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • openToEnclosingScope
          boolean openToEnclosingScope
    • Class org.ek9lang.compiler.symbols.CaptureScopedSymbol

      class CaptureScopedSymbol extends ScopedSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • capturedVariables
          CaptureScope capturedVariables
          For dynamic functions/types we can capture variables from the enclosing scope(s) and pull them in. We can then hold and access them in the dynamic function/type even when the function has moved out of the original scope. i.e. a sort of closure over variables.
        • markedAbstract
          boolean markedAbstract
          Was it marked abstract in the source code.
        • moduleScope
          IScope moduleScope
          This is the module this function has been defined in.
    • Class org.ek9lang.compiler.symbols.ConstantSymbol

      class ConstantSymbol extends Symbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • literal
          boolean literal
          Is this constant defined as a literal.
    • Class org.ek9lang.compiler.symbols.ControlSymbol

      class ControlSymbol extends ScopedSymbol implements Serializable
      serialVersionUID:
      1L
    • Record Class org.ek9lang.compiler.symbols.Ek9Types

      class Ek9Types extends Record implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • ek9Boolean
          ISymbol ek9Boolean
          The field for the ek9Boolean record component.
        • ek9Character
          ISymbol ek9Character
          The field for the ek9Character record component.
        • ek9Comparator
          ISymbol ek9Comparator
          The field for the ek9Comparator record component.
        • ek9Consumer
          ISymbol ek9Consumer
          The field for the ek9Consumer record component.
        • ek9Date
          ISymbol ek9Date
          The field for the ek9Date record component.
        • ek9DateTime
          ISymbol ek9DateTime
          The field for the ek9DateTime record component.
        • ek9Dictionary
          ISymbol ek9Dictionary
          The field for the ek9Dictionary record component.
        • ek9DictionaryEntry
          ISymbol ek9DictionaryEntry
          The field for the ek9DictionaryEntry record component.
        • ek9Duration
          ISymbol ek9Duration
          The field for the ek9Duration record component.
        • ek9Exception
          ISymbol ek9Exception
          The field for the ek9Exception record component.
        • ek9Float
          ISymbol ek9Float
          The field for the ek9Float record component.
        • ek9Function
          ISymbol ek9Function
          The field for the ek9Function record component.
        • ek9HttpRequest
          ISymbol ek9HttpRequest
          The field for the ek9HttpRequest record component.
        • ek9HttpResponse
          ISymbol ek9HttpResponse
          The field for the ek9HttpResponse record component.
        • ek9Integer
          ISymbol ek9Integer
          The field for the ek9Integer record component.
        • ek9Iterator
          ISymbol ek9Iterator
          The field for the ek9Iterator record component.
        • ek9Json
          ISymbol ek9Json
          The field for the ek9Json record component.
        • ek9List
          ISymbol ek9List
          The field for the ek9List record component.
        • ek9Millisecond
          ISymbol ek9Millisecond
          The field for the ek9Millisecond record component.
        • ek9Optional
          ISymbol ek9Optional
          The field for the ek9Optional record component.
        • ek9Path
          ISymbol ek9Path
          The field for the ek9Path record component.
        • ek9Predicate
          ISymbol ek9Predicate
          The field for the ek9Predicate record component.
        • ek9Result
          ISymbol ek9Result
          The field for the ek9Result record component.
        • ek9String
          ISymbol ek9String
          The field for the ek9String record component.
        • ek9Supplier
          ISymbol ek9Supplier
          The field for the ek9Supplier record component.
        • ek9Time
          ISymbol ek9Time
          The field for the ek9Time record component.
        • ek9UnaryOperator
          ISymbol ek9UnaryOperator
          The field for the ek9UnaryOperator record component.
        • ek9Version
          ISymbol ek9Version
          The field for the ek9Version record component.
        • ek9Void
          ISymbol ek9Void
          The field for the ek9Void record component.
    • Class org.ek9lang.compiler.symbols.ExpressionSymbol

      class ExpressionSymbol extends Symbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • declaredAsConstant
          boolean declaredAsConstant
        • promotionRequired
          boolean promotionRequired
        • useStringOperator
          boolean useStringOperator
    • Class org.ek9lang.compiler.symbols.ForSymbol

      class ForSymbol extends ScopedSymbol implements Serializable
      serialVersionUID:
      1L
    • Class org.ek9lang.compiler.symbols.FunctionSymbol

      class FunctionSymbol extends PossibleGenericSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • matcher
          SymbolMatcher matcher
        • returningSymbol
          VariableSymbol returningSymbol
          Keep separate variable for what we are returning because we need its name and type.
        • superFunction
          FunctionSymbol superFunction
          To be used when this function extends an abstract function. So we want the same method signature as the abstract function but this provides the implementation. It is sort of object-oriented but for functions.
    • Class org.ek9lang.compiler.symbols.LocalScope

      class LocalScope extends SymbolTable implements Serializable
      serialVersionUID:
      1L
    • Class org.ek9lang.compiler.symbols.MethodSymbol

      class MethodSymbol extends ScopedSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • accessModifier
          String accessModifier
          By default, access to methods is public unless otherwise modified.
        • constructor
          boolean constructor
          Is this a constructor method or just a normal method.
        • ek9ReturnsThis
          boolean ek9ReturnsThis
          Really just used for reverse engineered methods from Java we need to know if the method returns this or not.
        • markedAbstract
          boolean markedAbstract
          Was it marked abstract in the source code.
        • markedAsDispatcher
          boolean markedAsDispatcher
        • markedNoClone
          boolean markedNoClone
          Should this method be cloned during a clone operation like for type defines.
        • matcher
          SymbolMatcher matcher
        • operator
          boolean operator
          Is this an operator like := or < etc.
        • override
          boolean override
          So has the developer indicated that this method is an overriding method.
        • returningSymbol
          ISymbol returningSymbol
          Keep separate variable for what we are returning because we need its name and type.
        • synthetic
          boolean synthetic
          Is this method a synthetic one, ie typically for constructors the compiler can indicate this method should be created in code generation.
        • usedAsProxyForDelegate
          String usedAsProxyForDelegate
          This is the name of the delegate in the aggregate. DelegatingProcessor with trait of Processor by proc proc as Processor? This is held at method level, so some methods can be delegated and others implemented. In effect the compiler needs to add synthetic methods in for the methods on the trait. But the developer can decide to implement them if they elect to.
    • Class org.ek9lang.compiler.symbols.ModuleScope

      class ModuleScope extends SymbolTable implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • compilableProgram
          SharedThreadContext<CompilableProgram> compilableProgram
        • originalReferenceResolution
          Map<String,IToken> originalReferenceResolution
          When a reference to a symbol is made, keep track of where that first reference was. This enables the compiler to give better error messages, indicating where a reference was first successful. So if there are duplicates of clashes, it can report where the first reference was.
        • referencesScope
          Map<String,ISymbol> referencesScope
          This is where we store the references to other module symbols but as a shorthand. i.e "Item" will map to com.abc.Item.
    • Class org.ek9lang.compiler.symbols.ParamExpressionSymbol

      class ParamExpressionSymbol extends Symbol implements Serializable
      serialVersionUID:
      1L
    • Class org.ek9lang.compiler.symbols.PossibleGenericSymbol

      class PossibleGenericSymbol extends CaptureScopedSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • conceptualTypeParameter
          boolean conceptualTypeParameter
          This is actually a 'T' itself - we will need to know this. So we use an aggregate symbol to model the 'S' and 'T' conceptual types. These are 'synthetic' in nature but do have 'synthetic' operators, so that generic/template classes/functions can 'assume' certain operators and operations. Only when the generic type is actually parameterised with a 'concrete' type does the compiler check that the generic class/function that used the operators can be used with the actual concrete type.
        • genericType
          PossibleGenericSymbol genericType
          This is the optional reference to a 'generic type' (could be a class or a function). That 'generic type' will have its own 'type parameters'. i.e. the 'K', "V' or 'T' things.
        • openForExtension
          boolean openForExtension
          Is this aggregate/function open to be extended. i.e. is it closed so that it cannot be extended.
        • parameterisedTypeReferences
          List<PossibleGenericSymbol> parameterisedTypeReferences
          If this AggregateSymbol/FunctionSymbol is a generic type then within its code area either properties, methods or return types it may use another generic type with the same parameters K and V for example. So when we come to actually use this generic type class with K=String and V=Float we must also look to replace these conceptual parameterised type symbols because they would be Item of (K, V) and need to be Item of (String, Float). A good example is Map of (K, V) and MapEntry of(K, V) - when you make a Map of (String, Float) we replace K→String, V→Float but also need to replace MapEntry of(K, V) with MapEntry of(String, Float). You could also imagine a situation where you have to replace Something of (Integer, V) with Something of (Integer, Float)!
        • typeParameterOrArguments
          List<ISymbol> typeParameterOrArguments
          If this were the 'generic type': This is the list of generic parameters the class/function can accept. If we were generating a 'non-generic' class 'A' then this would be empty But if it were a 'generic type' class like 'class B of type T' then this would be set to Symbol T. Likewise 'generic' function zule of type (K,V) would have K and V symbols in it. OK, so far so good, but this class can also now be used as a 'parameterized type', this means that this same class can have a reference in the 'genericType' above. Imagine 'List of type T', The 'List' is an AggregateSymbol and the 'T' goes into parameterTypesOrArguments below. Now imagine: var as List of Integer, this is a 'parameterized type', it too is an AggregateSymbol. BUT: it references the List AggregateSymbol in 'genericType' AND Integer in 'parameterTypesOrArguments' So when a 'GenericType' is being parameterized these are the arguments. So this has dual use: 1. For a 'GenericType' it is the 'type parameters' 2. For a 'Parameterized Type' i.e. uses a 'GenericType' - that has its own 'type parameters' - this is then used as the 'type arguments'.
    • Class org.ek9lang.compiler.symbols.ScopedSymbol

      class ScopedSymbol extends Symbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • actualScope
          LocalScope actualScope
          This is the scope where any symbols actually get defined.
        • encounteredExceptionToken
          IToken encounteredExceptionToken
          If we encounter an exception within a scope we need to note the line number.
        • outerMostTypeOrFunction
          IScopedSymbol outerMostTypeOrFunction
          For some scoped symbols - dynamic functions and classes it is important to keep a reference to the outermost enclosing aggregate or function.
    • Class org.ek9lang.compiler.symbols.ServiceOperationSymbol

      class ServiceOperationSymbol extends MethodSymbol implements Serializable
      serialVersionUID:
      1L
    • Class org.ek9lang.compiler.symbols.StackConsistencyScope

      class StackConsistencyScope extends ScopedSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

    • Class org.ek9lang.compiler.symbols.StreamCallSymbol

      class StreamCallSymbol extends MethodSymbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • capableOfConsumingAnything
          boolean capableOfConsumingAnything
          For head, skip, tail, flatten, call and async - we're not bothered what type we get indeed this 'command' has no way of knowing what it will/should be passed. So it does need to be told, so it can also say what it produces. So I'm expecting the pipeline to go through and tell these type of calls what they will be consuming. So that logic will need to also check a couple of things for flatten, call and async as those do have constraints.
        • consumesSymbolPromotionRequired
          boolean consumesSymbolPromotionRequired
        • consumesSymbolType
          ISymbol consumesSymbolType
        • derivesProducesTypeFromConsumesType
          boolean derivesProducesTypeFromConsumesType
          For flatten the consumes must have an iterator and the call would produce N of the type the iterator supplies.
        • producerSymbolTypeSameAsConsumerSymbolType
          boolean producerSymbolTypeSameAsConsumerSymbolType
          In the case of something like filter, head, tail, skip whatever is consumed is also produced (conditionally and maybe in limited volume).
        • producesSymbolType
          ISymbol producesSymbolType
        • producesTypeMustBeAFunction
          boolean producesTypeMustBeAFunction
          Should the upstream producer be a function or not.
        • sinkInNature
          boolean sinkInNature
          Typically used in terminal but also tee. This indicates that when a pipeline type is known in the pipeline itself we really want to check if this sort of call is capable of receiving it in some way via the '|' pipe operator. Originally I was only going to allow one type of object to be received via pipe, but if we can support multiple '|' pipe operators it means we have more flexibility and can reduce the number of map functions required.
    • Class org.ek9lang.compiler.symbols.StreamPipeLineSymbol

      class StreamPipeLineSymbol extends Symbol implements Serializable
      serialVersionUID:
      1L
    • Class org.ek9lang.compiler.symbols.SwitchSymbol

      class SwitchSymbol extends ControlSymbol implements Serializable
      serialVersionUID:
      1L
    • Class org.ek9lang.compiler.symbols.Symbol

      class Symbol extends Object implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • category
          ISymbol.SymbolCategory category
          This tells you what nature this symbol has.
        • ek9Core
          boolean ek9Core
          Used to mark a symbol as ek9 core or not.
        • genus
          ISymbol.SymbolGenus genus
          What sort of ek9 'construct' is this.
        • initialisedBy
          IToken initialisedBy
          This is the token that initialised the symbol. Typically, ony valid for Variables and expressions. But if we're talking components, they will get injected with '!'. So this may just be set when the variable is declared as having an 'injected' assignment.
        • injectionExpected
          boolean injectionExpected
          For components, we need to know if injection is expected.
        • markedPure
          boolean markedPure
          Is this symbol marked as being pure. The concept of 'pure' is focussed on immutability. In EK9 there is no 'const', 'final' or anything like that. The concept is based around 'processing' i.e. a function/method etc can be marked as 'pure'. Within that 'pure block' there are limits on variable reassignments.
        • name
          String name
          The actual name of the symbol, but can be 'mangled' or conceptual.
        • notMutable
          boolean notMutable
          Is this mutable or not.
        • nullAllowed
          boolean nullAllowed
          The idea is to assume that symbol cannot be null by default. i.e a variable cannot null or a function/method cannot return a null value If the developer wants to support then ? has to be used to make that explicit. In an ideal world we would have eradicated 'null', but to support specific concepts like generics and abstract types - a null value has to be available in someway. because how to you initialise 'var as T' - where the 'T' is an abstract type that cannot be instantiated?
        • parsedModule
          Module parsedModule
          Where this symbol come from - not always set for every symbol. Try to remove this, squirrel data where possible and move Also try using source file name from tokenSource.
        • produceFullyQualifiedName
          boolean produceFullyQualifiedName
        • referenced
          boolean referenced
          Was this symbol referenced. Typically, for variables, rules may check this - because if not referenced what's the point. But with IOC and injection this is sometimes more complex to establish.
        • sourceToken
          IToken sourceToken
          The token where this symbol was defined.
        • squirrelledAway
          Map<String,String> squirrelledAway
          This is the 'bit bucket' where during the parsing and IR phases information about the symbol can be augmented.
        • type
          ISymbol type
          So for some symbols (some controls) this makes little sense, they cannot have a 'type'. But a variable call 'x' will have a type - it could be an 'Integer' for example.
    • Class org.ek9lang.compiler.symbols.SymbolTable

      class SymbolTable extends Object implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • encounteredExceptionToken
          IToken encounteredExceptionToken
          If we encounter an exception within a scope we need to note the line number.
        • markedPure
          boolean markedPure
          Is this scope marked as pure, so that mutations cannot be undertaken.
        • matcher
          SymbolMatcher matcher
        • orderedSymbols
          List<ISymbol> orderedSymbols
          But also keep an ordered list - useful for ordered parameters.
        • scopeName
          String scopeName
        • splitSymbols
          Map<ISymbol.SymbolCategory,Map<String,List<ISymbol>>> splitSymbols
          We now store the symbols in separate areas for quick access. It might seem strange but for some symbols like methods we have a single name but a list of actual symbols. i.e. method overloading.
    • Class org.ek9lang.compiler.symbols.TrySymbol

      class TrySymbol extends ControlSymbol implements Serializable
      serialVersionUID:
      1L
    • Class org.ek9lang.compiler.symbols.VariableSymbol

      class VariableSymbol extends Symbol implements Serializable
      serialVersionUID:
      1L
      • Serialized Fields

        • incomingParameter
          boolean incomingParameter
        • isAggregatePropertyField
          boolean isAggregatePropertyField
        • isPrivate
          boolean isPrivate
          Limited scope of variables from other scopes fields/properties on classes/components etc. are always private Those on records are public and local variable a visible up the scope tree. So it depends on where you are accessing the variable from.
        • loopVariable
          boolean loopVariable
        • returningParameter
          boolean returningParameter
    • Class org.ek9lang.compiler.symbols.WhileSymbol

      class WhileSymbol extends ScopedSymbol implements Serializable
      serialVersionUID:
      1L
  • Package org.ek9lang.compiler.tokenizer

  • Package org.ek9lang.core