ScalaSigAttributeParsers

trait Rules
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class DefaultRule[In, Out, A, X](f: In => Result[Out, A, X])
Inherited from
Rules
trait FromRule[In]
Inherited from
Rules

Inherited types

type Parser[A] = Rule[A, String]
Inherited from
ByteCodeReader
type Rule[+A, +X] = Rule[S, S, A, X]
Inherited from
StateRules
type S = ByteCode
Inherited from
ByteCodeReader

Value members

Concrete methods

def parse(byteCode: ByteCode): ScalaSig

Inherited methods

def allOf[A, X](rules: Seq[Rule[A, X]]): S => Result[S, List[A], X]

Create a rule that succeeds if all of the given rules succeed.

Create a rule that succeeds if all of the given rules succeed.

Value Params
rules

the rules to apply in sequence.

Inherited from
StateRules
def anyOf[A, X](rules: Seq[Rule[A, X]]): Rule[S, S, List[A], X]

Create a rule that succeeds with a list of all the provided rules that succeed.

Create a rule that succeeds with a list of all the provided rules that succeed.

Value Params
rules

the rules to apply in sequence.

Inherited from
StateRules
def apply[A, X](f: S => Result[S, A, X]): Rule[S, S, A, X]
Inherited from
StateRules
def bytes(n: Int): Rule[S, S, ByteCode, Nothing]
Inherited from
ByteCodeReader
def cond(f: S => Boolean): Rule[S, S, S, Nothing]

Create a rule that identities if f(in) is true.

Create a rule that identities if f(in) is true.

Inherited from
StateRules
def error[X](err: X): Rule[Any, Nothing, Nothing, X]
Inherited from
Rules
def error[In]: Rule[In, Nothing, Nothing, In]
Inherited from
Rules
def expect[In, Out, A, Any](rule: Rule[In, Out, A, Any]): In => A

Converts a rule into a function that throws an Exception on failure.

Converts a rule into a function that throws an Exception on failure.

Inherited from
Rules
def failure: Rule[Any, Nothing, Nothing, Nothing]
Inherited from
Rules
def from[In]: FromRule[In]
Inherited from
Rules
def get: Rule[S, S, S, Nothing]
Inherited from
StateRules
def nil: Rule[S, S, Nil, Nothing]
Inherited from
StateRules
def none: Rule[S, S, None, Nothing]
Inherited from
StateRules
def oneOf[In, Out, A, X](rules: Rule[In, Out, A, X]*): Rule[In, Out, A, X]
Inherited from
Rules
def read[A](f: S => A): Rule[S, S, A, Nothing]
Inherited from
StateRules
def repeatUntil[T, X](rule: Rule[T => T, X])(finished: T => Boolean)(initial: T): Rule[S, S, T, X]

Repeatedly apply a rule from initial value until finished condition is met.

Repeatedly apply a rule from initial value until finished condition is met.

Inherited from
StateRules
def ruleWithName[In, Out, A, X](_name: String, f: In => Result[Out, A, X]): Rule[In, Out, A, X] & Name
Inherited from
Rules
def set(s: => S): Rule[S, S, S, Nothing]
Inherited from
StateRules
def state[s]: StateRules { type S = s; }
Inherited from
Rules
def success[Out, A](out: Out, a: A): Rule[Any, Out, A, Nothing]
Inherited from
Rules
def unit[A](a: => A): Rule[S, S, A, Nothing]
Inherited from
StateRules
def update(f: S => S): Rule[S, S, S, Nothing]
Inherited from
StateRules

Concrete fields

val entry: Rule[S, ByteCode, Int ~ ByteCode, Nothing]
val longValue: Rule[S, S, Long, Nothing]
val nat: Rule[S, S, Int, Nothing]
val rawBytes: Rule[S, ByteCode, ByteCode, Nothing]
val scalaSig: Rule[S, ByteCode, ScalaSig, Nothing]
val symtab: Rule[S, ByteCode, Seq[Int ~ ByteCode], Nothing]
val utf8: Rule[S, S, String, Nothing]

Inherited fields

val byte: Rule[S, S, Byte, Nothing]
Inherited from
ByteCodeReader
Inherited from
RulesWithState
val u1: Rule[S, S, Int, Nothing]
Inherited from
ByteCodeReader
val u2: Rule[S, S, Int, Nothing]
Inherited from
ByteCodeReader
val u4: Rule[S, S, Int, Nothing]
Inherited from
ByteCodeReader

Implicits

Inherited implicits

implicit def inRule[In, Out, A, X](rule: Rule[In, Out, A, X]): InRule[In, Out, A, X]
Inherited from
Rules
implicit def rule[In, Out, A, X](f: In => Result[Out, A, X]): Rule[In, Out, A, X]
Inherited from
Rules
implicit def seqRule[In, A, X](rule: Rule[In, In, A, X]): SeqRule[In, A, X]
Inherited from
Rules