trait Base extends TokenParsers with PackratParsers
The Base trait implements the common parsers shared both by problems and proof objects described by the TPTP syntax. They return an AST representation of the syntax, logic formulas are translated to their corresponding representation in Scavenger.
- Alphabetic
- By Inheritance
- Base
- PackratParsers
- TokenParsers
- Parsers
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Type Members
-
type
Elem = TPTPLexical.Token
- Definition Classes
- TokenParsers → Parsers
-
case class
Error extends NoSuccess with Product with Serializable
- Definition Classes
- Parsers
-
case class
Failure extends NoSuccess with Product with Serializable
- Definition Classes
- Parsers
-
type
Input = Reader[Elem]
- Definition Classes
- Parsers
-
sealed abstract
class
NoSuccess extends ParseResult[Nothing]
- Definition Classes
- Parsers
-
trait
OnceParser[+T] extends Parser[T]
- Definition Classes
- Parsers
-
abstract
class
PackratParser[+T] extends scala.util.parsing.combinator.PackratParsers.Parser[T]
- Definition Classes
- PackratParsers
-
class
PackratReader[+T] extends Reader[T]
- Definition Classes
- PackratParsers
-
sealed abstract
class
ParseResult[+T] extends AnyRef
- Definition Classes
- Parsers
-
abstract
class
Parser[+T] extends (Input) ⇒ ParseResult[T]
- Definition Classes
- Parsers
-
case class
Success[+T] extends ParseResult[T] with Product with Serializable
- Definition Classes
- Parsers
-
type
Tokens = TPTPTokens
- Definition Classes
- Base → TokenParsers
-
case class
~[+a, +b] extends Product with Serializable
- Definition Classes
- Parsers
Abstract Value Members
- abstract val includesDir: Path
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Base, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]
- Definition Classes
- Parsers
-
def
Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]
- Definition Classes
- Parsers
- def TPTP_file: Parser[List[TPTPDirective]]
- def TPTP_input: Parser[List[TPTPDirective]]
-
def
accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]
- Definition Classes
- Parsers
-
def
accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]
- Definition Classes
- Parsers
-
implicit
def
accept(e: Elem): Parser[Elem]
- Definition Classes
- Parsers
-
def
acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]
- Definition Classes
- Parsers
-
def
acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]
- Definition Classes
- Parsers
-
def
acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]
- Definition Classes
- Parsers
- def annotatedPattern(languageToken: TPTPLexical.Token, expectedFormula: Parser[RepresentedFormula]): Parser[~[~[~[String, String], RepresentedFormula], Annotations]]
- def annotated_formula: Parser[AnnotatedFormula]
- def annotations: Parser[Annotations]
- def arguments: Parser[List[E]]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assoc_connective: Parser[TPTPLexical.Token]
- def atomic_defined_word: Parser[String]
- def atomic_formula: Parser[E]
- def atomic_system_word: Parser[String]
- def atomic_word: Parser[String]
- def binary_connective: Parser[TPTPLexical.Token]
-
def
chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]
- Definition Classes
- Parsers
-
def
chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]
- Definition Classes
- Parsers
-
def
chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]
- Definition Classes
- Parsers
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def cnf_annotated: Parser[AnnotatedFormula]
- def cnf_formula: Parser[RepresentedFormula]
-
def
commit[T](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
- def conditional_term: Parser[E]
- def constant: Parser[String]
- def defined_infix_formula: Parser[E]
- def defined_plain_formula: Parser[E]
- def defined_plain_term: Parser[(String, List[E])]
- def defined_type: Parser[String]
- lazy val disjunction: PackratParser[(List[E], List[E])]
-
def
elem(e: Elem): Parser[Elem]
- Definition Classes
- Parsers
-
def
elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]
- Definition Classes
- Parsers
- def ensuring(cond: (Base) ⇒ Boolean, msg: ⇒ Any): Base
- def ensuring(cond: (Base) ⇒ Boolean): Base
- def ensuring(cond: Boolean, msg: ⇒ Any): Base
- def ensuring(cond: Boolean): Base
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
err(msg: String): Parser[Nothing]
- Definition Classes
- Parsers
-
def
expandIncludes(directives: List[TPTPDirective], parser: Parser[List[TPTPDirective]]): List[TPTPDirective]
A simple implementation for the expansion of include directives
A simple implementation for the expansion of include directives
TODO: Detect include loops TODO: Analyze whether to track only the selected formulas or all the file (as done know). This is not trivial because thf and tff define types annotated formulas with the same name of the annotated formula.
- directives
A list of TPTP directives (includes and/or annotated formulas)
- returns
The expansion of all the includes (recursively) to the files
- def extract[Target](fileName: Path, parser: Parser[Target]): Target
-
def
failure(msg: String): Parser[Nothing]
- Definition Classes
- Parsers
- def file_name: Parser[String]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- lazy val fof_and_formula: PackratParser[E]
- def fof_annotated: Parser[AnnotatedFormula]
- def fof_binary_assoc: Parser[E]
- def fof_binary_formula: Parser[E]
- def fof_binary_non_assoc: Parser[E]
- def fof_formula: Parser[RepresentedFormula]
- def fof_logic_formula: Parser[E]
- lazy val fof_or_formula: PackratParser[E]
- def fof_quantified_formula: Parser[E]
- def fof_sequent: Parser[RepresentedFormula]
- def fof_tuple: Parser[List[E]]
- def fof_unary_formula: Parser[E]
- def fof_unitary_formula: Parser[E]
- def fol_infix_unary: Parser[~[E, E]]
- def fol_quantifier: Parser[TPTPLexical.Token]
- def formatted(fmtstr: String): String
- def formula_data: Parser[FormulaData]
- def formula_role: Parser[String]
- def function_term: Parser[E]
- def general_data: Parser[GeneralData]
- def general_function: Parser[GFunc]
- def general_list: Parser[List[GeneralTerm]]
- def general_term: Parser[GeneralTerm]
- def general_terms: Parser[List[GeneralTerm]]
- def gentzen_arrow: Parser[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- def getSeenVars: Set[Sym]
-
def
guard[T](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def include: Parser[List[TPTPDirective]]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def let_term: Parser[E]
-
val
lexical: TPTPLexical
- Definition Classes
- Base → TokenParsers
- def literal: Parser[Either[E, E]]
-
def
log[T](p: ⇒ Parser[T])(name: String): Parser[T]
- Definition Classes
- Parsers
-
def
memo[T](p: Parser[T]): PackratParser[T]
- Definition Classes
- PackratParsers
-
def
mkList[T]: (~[T, List[T]]) ⇒ List[T]
- Definition Classes
- Parsers
- def name: Parser[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
not[T](p: ⇒ Parser[T]): Parser[Unit]
- Definition Classes
- Parsers
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def number: Parser[String]
-
def
opt[T](p: ⇒ Parser[T]): Parser[Option[T]]
- Definition Classes
- Parsers
- def optional_info: Parser[List[GeneralTerm]]
- def parse[Target](input: Path, parser: Parser[Target]): ParseResult[Target]
- def parseString[Target](input: Reader[Char], parser: Parser[Target]): ParseResult[Target]
-
implicit
def
parser2packrat[T](p: ⇒ Parser[T]): PackratParser[T]
- Definition Classes
- PackratParsers
-
def
phrase[T](p: Parser[T]): PackratParser[T]
- Definition Classes
- PackratParsers → Parsers
- def plain_atomic_formula: Parser[E]
- def plain_term: Parser[(String, List[E])]
-
def
positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
rep[T](p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The
p0call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
def
rep1[T](p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]
- Definition Classes
- Parsers
- def resetVarsSeen(): Unit
- def source: Parser[Source]
- def subtype_sign: Parser[String]
-
def
success[T](v: T): Parser[T]
- Definition Classes
- Parsers
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def system_atomic_formula: Parser[E]
- def system_term: Parser[(String, List[E])]
- def system_type: Parser[String]
- def term: Parser[E]
- lazy val tff_and_formula: PackratParser[E]
- def tff_annotated: Parser[AnnotatedFormula]
- def tff_atomic_type: Parser[T]
- def tff_binary_assoc: Parser[E]
- def tff_binary_formula: Parser[E]
- def tff_binary_non_assoc: Parser[E]
- def tff_conditional: Parser[E]
- def tff_formula: Parser[RepresentedFormula]
- def tff_let: Parser[E]
- def tff_logic_formula: Parser[E]
- def tff_mapping_type: Parser[T]
- def tff_monotype: Parser[T]
- lazy val tff_or_formula: PackratParser[E]
- def tff_quantified_formula: Parser[E]
- def tff_quantified_type: Parser[T]
- def tff_sequent: Parser[RepresentedFormula]
- def tff_top_level_type: Parser[T]
- def tff_tuple: Parser[List[E]]
- def tff_type_arguments: Parser[List[T]]
- def tff_typed_atom: Parser[RepresentedFormula]
- def tff_typed_variable: Parser[(Var, T)]
- def tff_unary_formula: Parser[E]
- def tff_unitary_formula: Parser[E]
- def tff_unitary_type: Parser[T]
- def tff_untyped_atom: Parser[String]
- def tff_variable: Parser[(Var, T)]
- lazy val tff_xprod_type: PackratParser[T]
- lazy val thf_and_formula: PackratParser[E]
- def thf_annotated: Parser[AnnotatedFormula]
- lazy val thf_apply_formula: PackratParser[E]
- def thf_atom: Parser[E]
- def thf_binary_formula: Parser[E]
- def thf_binary_pair: Parser[E]
- def thf_binary_tuple: Parser[E]
- def thf_binary_type: Parser[T]
- def thf_conditional: Parser[E]
- def thf_conn_term: Parser[E]
- def thf_formula: Parser[RepresentedFormula]
- def thf_let: Parser[Nothing]
- def thf_logic_formula: Parser[E]
- lazy val thf_mapping_type: PackratParser[T]
- lazy val thf_or_formula: PackratParser[E]
- def thf_pair_connective: Parser[TPTPLexical.Token]
- def thf_quantified_formula: Parser[E]
- def thf_quantifier: Parser[TPTPLexical.Token]
- def thf_sequent: Parser[RepresentedFormula]
- def thf_subtype: Parser[SimpleType]
- def thf_top_level_type: Parser[T]
- def thf_tuple: Parser[List[E]]
- def thf_type_formula: Parser[SimpleType]
- def thf_typeable_formula: Parser[String]
- def thf_typed_variable: Parser[(Var, T)]
- def thf_unary_connective: Parser[Any]
- def thf_unary_formula: Parser[E]
- lazy val thf_union_type: PackratParser[T]
- def thf_unitary_formula: Parser[E]
- def thf_unitary_type: Parser[T]
- def thf_variable: Parser[(Var, T)]
- lazy val thf_xprod_type: PackratParser[T]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def tokens(input: Reader[Char]): TPTPLexical.Scanner
- def tokens(input: String): TPTPLexical.Scanner
- def tpi_annotated: Parser[AnnotatedFormula]
- def tpi_formula: Parser[RepresentedFormula]
- val typedExpressions: HashMap[String, T]
- def unary_connective: Parser[TPTPLexical.Token]
- def useful_info: Parser[List[GeneralTerm]]
- def variable: Parser[String]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Base, B)