com.ossuminc.riddl.passes

Members list

Type members

Classlikes

A Pass subclass that processes the AST exactly the same as the depth first search that the Pass class uses.

A Pass subclass that processes the AST exactly the same as the depth first search that the Pass class uses. The only difference is that

Type parameters

ET

The element type of the collected values

Value parameters

input

The PassInput to process

outputs

The outputs from previous pass runs in case they are needed as input to this CollectingPass

Attributes

Source
Pass.scala
Supertypes
class Pass
class Object
trait Matchable
class Any
Known subtypes

An abstract PassOutput for use with passes that derive from CollectingPass.

An abstract PassOutput for use with passes that derive from CollectingPass. This just provides a standard field name for the data that is collected, being collected.

Type parameters

T

The element type of the collected data

Value parameters

collected

The data that was collected from the CollectingPass's run

messages

The required messages field from the PassOutput trait

Attributes

Source
Pass.scala
Supertypes
trait PassOutput
class Object
trait Matchable
class Any
Known subtypes

A Pass base class that allows the processing to be done based on containers, and calling these methods:

A Pass base class that allows the processing to be done based on containers, and calling these methods:

  • openContainer at the start of container's processing

  • processLeaf for any leaf nodes within the container

    • processValue for any non-definitions within the container

  • closeContainer after all the container's contents have been processed

This kind of Pass allows the processing to follow the AST hierarchy so that container nodes can run before all their content (openContainer) and also after all its content (closeContainer). This is necessary for passes that must maintain the hierarchical structure of the AST model in their processing.

Value parameters

input

The PassInput to process

outputs

The outputs of previous passes in case this pass needs it

Attributes

Source
Pass.scala
Supertypes
class Pass
class Object
trait Matchable
class Any
Known subtypes
class VisitingPass[VT]
class PrettifyPass
abstract class Pass(val in: PassInput, val out: PassesOutput)(using io: PlatformContext)

Abstract Pass definition.

Abstract Pass definition.

Value parameters

in

The input to the pass. This provides the data over which the pass is executed

out

The output from previous runs of OTHER passes, which is a form of input to the pass, perhaps.

Attributes

Companion
object
Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class HugoPass
class DiagramsPass
class SymbolsPass
class CollectingPass[ET]
class GlossaryPass
class MessagesPass
class ToDoListPass
class StatsPass
class VisitingPass[VT]
class PrettifyPass
Show all
object Pass

Attributes

Companion
class
Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Pass.type

Information a pass must provide, basically its name and a function to create the pass

Information a pass must provide, basically its name and a function to create the pass

Attributes

Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object HugoPass
object MessagesPass
object ToDoListPass
object DiagramsPass
object PrettifyPass
object StatsPass
object SymbolsPass
Show all
case class PassInput(root: Root)

The input to a Pass in order to do its work.

The input to a Pass in order to do its work. This consists of just the parsed model and the common options. Passes cannot extend this.

Value parameters

root

The result of the parsing run, consisting of the RootContainer from which all AST content can be reached

Attributes

Companion
object
Source
Pass.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PassInput

Attributes

Companion
class
Source
Pass.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
PassInput.type
trait PassOptions

Base trait for options classes that are needed by passes

Base trait for options classes that are needed by passes

Attributes

Companion
object
Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Options
class Options
class Options
class Options
object PassOptions

Attributes

Companion
trait
Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait PassOutput

Information that a Pass must produce, currently just any messages it generated.

Information that a Pass must produce, currently just any messages it generated. Passes should derive their own concrete PassOutput classes from this trait

Attributes

Companion
object
Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object PassOutput

Attributes

Companion
trait
Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Self type
PassOutput.type
trait PassVisitor

The Visitor definition for the VisitingPass.

The Visitor definition for the VisitingPass. You must implement all the methods of this class and pass it to the VisitingPass

Attributes

Source
Pass.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class PassesOutput()

The output from running a set of Passes.

The output from running a set of Passes. This collects the PassOutput instances from each Pass run and provides utility messages for getting that information.

Attributes

Source
Pass.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

The result of running a set of passes.

The result of running a set of passes. This provides the input and outputs of the run as well as any additional messages (likely from an exception). This provides convenience methods for accessing the various output content

Value parameters

additionalMessages

Any additional messages, likely from an exception or other unusual circumstance.

input

The input provided to the run of the passes

outputs

The PassesOutput collected from teh run of the Passes

Attributes

Companion
object
Source
Pass.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PassesResult

Attributes

Companion
class
Source
Pass.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object Riddl

Primary Interface to Riddl Language parsing and validating

Primary Interface to Riddl Language parsing and validating

Attributes

Source
Riddl.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Riddl.type
abstract class VisitingPass[VT <: PassVisitor](val input: PassInput, val outputs: PassesOutput, val visitor: VT)(using x$4: PlatformContext) extends HierarchyPass

An abstract Pass that uses the Visitor pattern (https://refactoring.guru/design-patterns/visitor)

An abstract Pass that uses the Visitor pattern (https://refactoring.guru/design-patterns/visitor)

Value parameters

input

The PassInput to process

outputs

The outputs of previous passes in case this pass needs it

Attributes

Source
Pass.scala
Supertypes
class Pass
class Object
trait Matchable
class Any
Known subtypes
class PrettifyPass

Types

A function type that creates a Pass instance

A function type that creates a Pass instance

Attributes

Source
Pass.scala

A sequence of PassCreator.

A sequence of PassCreator. This is used to run a set of passes

Attributes

Source
Pass.scala