Package-level declarations

Types

Link copied to clipboard

An AvailAcceptedParseException is thrown by primitive P_AcceptParsing to indicate the fiber running a semantic restriction has accepted the argument types and does not need to restrict the proposed expression's type.

Link copied to clipboard

An AvailCodeGenerator is used to convert a phrase into the corresponding raw function.

Link copied to clipboard
class AvailCompiler(moduleHeader: ModuleHeader?, module: A_Module, source: A_String, textInterface: TextInterface, pollForAbort: () -> Boolean, progressReporter: CompilerProgressReporter, problemHandler: ProblemHandler)

The compiler for Avail code.

Link copied to clipboard

An AvailCompilerBipartiteRendezvous comes at parsing from both sides to maximize the freedom of implementation of the parser. It uses dynamic programming to avoid parsing the same subexpression multiple times. When a new continuation needs to run against all possible subexpressions, it looks up the current parser state in a map to get the bipartite rendezvous. That contains the list of subexpressions that have been parsed so far. They are all run against the new continuation. The continuation is then added to the bipartite rendezvous's list of actions. When a new complete subexpression is found it is run against all waiting actions and added to the list of subexpressions.

Link copied to clipboard

An AvailCompilerException is thrown by the Avail compiler when compilation fails for any reason.

Link copied to clipboard

An AvailCompilerFragmentCache implements a memoization mechanism for a compiler. The purpose is to ensure that the effort to parse a subexpression starting at a specific token is reused when backtracking.

Link copied to clipboard

An AvailRejectedParseException is thrown by primitive P_RejectParsing to indicate the fiber running a semantic restriction (or macro body or prefix function) has rejected the argument types or phrases for the reason specified in the exception's constructor.

Link copied to clipboard
class CompilationContext(val moduleHeader: ModuleHeader?, val module: A_Module, source: A_String, val textInterface: TextInterface, pollForAbort: () -> Boolean, val progressReporter: CompilerProgressReporter, problemHandler: ProblemHandler)

A CompilationContext lasts for a module's entire compilation activity.

Link copied to clipboard

The compiler notifies a CompilerProgressReporter whenever a top-level statement is parsed unambiguously.

The arguments are

  • the module name,

  • the module size in bytes,

  • the current parse position in bytes within the module,

  • the line number, or Int.MAX_VALUE if completed, and

  • a function that fetches the compiled top-level statement, or null if no phrase is available.

Link copied to clipboard

Throw a FiberTerminationException indicate that a fiber has suicided.

Link copied to clipboard

The compiler notifies a GlobalProgressReporter whenever a top-level statement is parsed unambiguously.

The arguments are:

  1. the current number of bytes that have been compiled and executed

  2. the total number of bytes of source being compiled.

Link copied to clipboard
class ModuleHeader(val moduleName: ResolvedModuleName)

A module's header information.

Link copied to clipboard

Information that a ModuleHeader uses to keep track of a module import, whether from an Extends clause or a Uses clause, as specified by the SpecialMethodAtom.MODULE_HEADER.

Link copied to clipboard

A ModuleManifestEntry is a short summary of an interesting definition created by some module. This includes atoms, method definitions, semantic restrictions, lexers, module variables/constants, etc.

Link copied to clipboard

ParserState instances are immutable and keep track of a current lexingState and clientDataMap during parsing.

Link copied to clipboard

A ParsingConversionRule describes how to convert the argument at the top of the parsing stack from one phrase to another.

Link copied to clipboard

ParsingOperation describes the operations available for parsing Avail message names.

Link copied to clipboard

These are the tokens that are understood directly by the Avail compiler.

Link copied to clipboard

The kinds of manifest entries that can be recorded. If this changes in a way other than adding enum values at the end, you must rebuild your repository files.