Parser

scair.Parser
See theParser companion object
class Parser(val context: MLContext, val args: Args) extends AttrParser

Attributes

Companion
object
Graph
Supertypes
class AttrParser
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def AttributeAliasDef[$ : ParsingRun]: ParsingRun[(String, Attribute)]
def Block[$ : ParsingRun]: ParsingRun[Block]
def BlockArgList[$ : ParsingRun]: ParsingRun[Seq[(String, Attribute)]]
def BlockLabel[$ : ParsingRun]: ParsingRun[(String, Seq[(String, Attribute)])]
def CustomOperation[$ : ParsingRun](resNames: Seq[String]): ParsingRun[Operation]
inline def DictionaryAttribute[$ : ParsingRun]: ParsingRun[Map[String, Attribute]]

Parses an attributes dictionary.

Parses an attributes dictionary.

Attributes

Returns

An attribute dictionary parser.

def GenericOperation[$ : ParsingRun](resNames: Seq[String]): ParsingRun[Operation]
def Op[$ : ParsingRun](resNames: Seq[String]): ParsingRun[Operation]
def OperationPat[$ : ParsingRun]: ParsingRun[Operation]
def Operations[$ : ParsingRun](at_least_this_many: Int): ParsingRun[Seq[Operation]]
inline def OptionalAttributes[$ : ParsingRun]: ParsingRun[Map[String, Attribute]]

Parses an optional attributes dictionary from the input.

Parses an optional attributes dictionary from the input.

Attributes

Returns

An optional dictionary of attributes - empty if no dictionary is present.

inline def OptionalKeywordAttributes[$ : ParsingRun]: ParsingRun[Map[String, Attribute]]

Parses an optional attributes dictionary from the input, preceded by the attributes keyword.

Parses an optional attributes dictionary from the input, preceded by the attributes keyword.

Attributes

Returns

An optional dictionary of attributes - empty if no keyword is present.

inline def OptionalProperties[$ : ParsingRun](): ParsingRun[Map[_ >: String & Nothing <: String | Nothing, Attribute | Nothing]]

Parses an optional properties dictionary from the input.

Parses an optional properties dictionary from the input.

Attributes

Returns

An optional dictionary of properties - empty if no dictionary is present.

def Region[$ : ParsingRun]: ParsingRun[Region]
def RegionList[$ : ParsingRun]: ParsingRun[Seq[Region]]
def TopLevel[$ : ParsingRun]: ParsingRun[Operation]
def TypeAlias[$ : ParsingRun]: ParsingRun[String]
def TypeAliasDef[$ : ParsingRun]: ParsingRun[(String, Attribute)]
def ValueIdAndType[$ : ParsingRun]: ParsingRun[(String, Attribute)]
def ValueIdAndTypeList[$ : ParsingRun]: ParsingRun[Seq[(String, Attribute)]]
def createBlock(uncutBlock: (String, Seq[(String, Attribute)], Seq[Operation])): Block
def defineRegion(parseResult: (Seq[Operation], Seq[Block])): Region
def enterLocalRegion: Unit
def enterParentRegion: Unit
def error(failure: Failure): String
def generateOperation(opName: String, operandsNames: Seq[String], successorsNames: Seq[String], properties: Map[String, Attribute], regions: Seq[Region], attributes: Map[String, Attribute], resultsTypes: Seq[Attribute], operandsTypes: Seq[Attribute]): Operation

Generates an operation based on the provided parameters.

Generates an operation based on the provided parameters.

Value parameters

attributes

A dictionary of attributes for the operation. Defaults to an empty dictionary.

opName

The name of the operation to generate.

operandsNames

A sequence of operand names. Defaults to an empty sequence.

operandsTypes

A sequence of operand types. Defaults to an empty sequence.

properties

A dictionary of properties for the operation. Defaults to an empty dictionary.

regions

A sequence of regions for the operation. Defaults to an empty sequence.

resultsTypes

A sequence of result types for the operation. Defaults to an empty sequence.

successorsNames

A sequence of successor names. Defaults to an empty sequence.

Attributes

Returns

The generated operation.

def parseThis[A, B](text: String, pattern: ParsingRun[_] => ParsingRun[B], verboseFailures: Boolean): Parsed[B]
def properties[$ : ParsingRun]: ParsingRun[Map[String, Attribute]]

Parses a properties dictionary, which synctatically simply is an attribute dictionary wrapped in angle brackets.

Parses a properties dictionary, which synctatically simply is an attribute dictionary wrapped in angle brackets.

Attributes

Returns

A properties dictionary parser.

Inherited methods

def AffineMapAttrP[$ : ParsingRun]: ParsingRun[AffineMapAttr]

Attributes

Inherited from:
AttrParser
def AffineSetAttrP[$ : ParsingRun]: ParsingRun[AffineSetAttr]

Attributes

Inherited from:
AttrParser
def ArrayAttributeP[$ : ParsingRun]: ParsingRun[ArrayAttribute[Attribute]]

Attributes

Inherited from:
AttrParser
def AttributeEntry[$ : ParsingRun]: ParsingRun[(String, Attribute)]

Attributes

Inherited from:
AttrParser
def AttributeValue[$ : ParsingRun]: ParsingRun[Attribute]

Attributes

Inherited from:
AttrParser
def BuiltIn[$ : ParsingRun]: ParsingRun[Attribute]

Attributes

Inherited from:
AttrParser
def DenseArrayAttributeP[$ : ParsingRun]: ParsingRun[DenseArrayAttr]

Attributes

Inherited from:
AttrParser
def DenseIntOrFPElementsAttrP[$ : ParsingRun]: ParsingRun[DenseIntOrFPElementsAttr]

Attributes

Inherited from:
AttrParser
def DialectAttribute[$ : ParsingRun]: ParsingRun[Attribute]

Attributes

Inherited from:
AttrParser
def DialectType[$ : ParsingRun]: ParsingRun[Attribute]

Attributes

Inherited from:
AttrParser
def Dimension[$ : ParsingRun]: ParsingRun[IntData]

Attributes

Inherited from:
AttrParser
def DimensionList[$ : ParsingRun]: ParsingRun[ArrayAttribute[IntData]]

Attributes

Inherited from:
AttrParser
def EmptyTensorLiteral[$ : ParsingRun]: ParsingRun[TensorLiteralArray]

Attributes

Inherited from:
AttrParser
def Encoding[$ : ParsingRun]: ParsingRun[Attribute]

Attributes

Inherited from:
AttrParser
def Float128TypeP[$ : ParsingRun]: ParsingRun[FloatType]

Attributes

Inherited from:
AttrParser
def Float16TypeP[$ : ParsingRun]: ParsingRun[FloatType]

Attributes

Inherited from:
AttrParser
def Float32TypeP[$ : ParsingRun]: ParsingRun[FloatType]

Attributes

Inherited from:
AttrParser
def Float64TypeP[$ : ParsingRun]: ParsingRun[FloatType]

Attributes

Inherited from:
AttrParser
def Float80TypeP[$ : ParsingRun]: ParsingRun[FloatType]

Attributes

Inherited from:
AttrParser
def FloatAttrP[$ : ParsingRun]: ParsingRun[FloatAttr]

Attributes

Inherited from:
AttrParser
def FloatDataP[$ : ParsingRun]: ParsingRun[FloatData]

Attributes

Inherited from:
AttrParser
def FloatTypeP[$ : ParsingRun]: ParsingRun[FloatType]

Attributes

Inherited from:
AttrParser
def FunctionType[$ : ParsingRun]: ParsingRun[(Seq[Attribute], Seq[Attribute])]

Attributes

Inherited from:
AttrParser
def FunctionTypeP[$ : ParsingRun]: ParsingRun[FunctionType]

Attributes

Inherited from:
AttrParser
def IndexTypeP[$ : ParsingRun]: ParsingRun[IndexType.type]

Attributes

Inherited from:
AttrParser
def IntDataP[$ : ParsingRun]: ParsingRun[IntData]

Attributes

Inherited from:
AttrParser
def IntegerAttrP[$ : ParsingRun]: ParsingRun[IntegerAttr]

Attributes

Inherited from:
AttrParser
def IntegerTypeP[$ : ParsingRun]: ParsingRun[IntegerType]

Attributes

Inherited from:
AttrParser
def MemrefTypeP[$ : ParsingRun]: ParsingRun[MemrefType]

Attributes

Inherited from:
AttrParser
def MultipleFloatTensorLiteral[$ : ParsingRun]: ParsingRun[ArrayAttribute[FloatAttr]]

Attributes

Inherited from:
AttrParser
def MultipleIntTensorLiteral[$ : ParsingRun]: ParsingRun[ArrayAttribute[IntegerAttr]]

Attributes

Inherited from:
AttrParser
def MultipleTensorLiteral[$ : ParsingRun]: ParsingRun[TensorLiteralArray]

Attributes

Inherited from:
AttrParser
def ParenTypeList[$ : ParsingRun]: ParsingRun[Seq[Attribute]]

Attributes

Inherited from:
AttrParser
def RankedMemrefTypeP[$ : ParsingRun]: ParsingRun[MemrefType]

Attributes

Inherited from:
AttrParser
def RankedTensorTypeP[$ : ParsingRun]: ParsingRun[TensorType]

Attributes

Inherited from:
AttrParser
def SignedIntegerTypeP[$ : ParsingRun]: ParsingRun[IntegerType]

Attributes

Inherited from:
AttrParser
def SignlessIntegerTypeP[$ : ParsingRun]: ParsingRun[IntegerType]

Attributes

Inherited from:
AttrParser
def SingleTensorLiteral[$ : ParsingRun]: ParsingRun[TensorLiteralArray]

Attributes

Inherited from:
AttrParser
def StringAttributeP[$ : ParsingRun]: ParsingRun[StringData]

Attributes

Inherited from:
AttrParser
def SymbolRefAttrP[$ : ParsingRun]: ParsingRun[SymbolRefAttr]

Attributes

Inherited from:
AttrParser
def TensorLiteral[$ : ParsingRun]: ParsingRun[TensorLiteralArray]

Attributes

Inherited from:
AttrParser
def TensorTypeP[$ : ParsingRun]: ParsingRun[TensorType]

Attributes

Inherited from:
AttrParser
def Type[$ : ParsingRun]: ParsingRun[Attribute]

Attributes

Inherited from:
AttrParser
def UnrankedMemrefTypeP[$ : ParsingRun]: ParsingRun[UnrankedMemrefType]

Attributes

Inherited from:
AttrParser
def UnrankedTensorTypeP[$ : ParsingRun]: ParsingRun[TensorType]

Attributes

Inherited from:
AttrParser
def UnsignedIntegerTypeP[$ : ParsingRun]: ParsingRun[IntegerType]

Attributes

Inherited from:
AttrParser
def VectorDimensionList[$ : ParsingRun]: ParsingRun[(Seq[IntData], Seq[IntData])]

Attributes

Inherited from:
AttrParser
def VectorTypeP[$ : ParsingRun]: ParsingRun[VectorType]

Attributes

Inherited from:
AttrParser

Concrete fields

val args: Args

Inherited fields

val ctx: MLContext

Attributes

Inherited from:
AttrParser

Implicits

Implicits

implicit val currentScope: Scope
implicit val whitespace: Whitespace