pub trait QuantifierParsing<'a, 'ctx, 'int> {
Show 16 methods
// Required methods
fn parse_quantified(&mut self) -> Result<&'a LogicExpr<'a>, ParseError>;
fn parse_restriction(
&mut self,
var_name: Symbol,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn parse_verb_phrase_for_restriction(
&mut self,
var_name: Symbol,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn combine_with_and(
&self,
exprs: Vec<&'a LogicExpr<'a>>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn wrap_with_definiteness_full(
&mut self,
np: &NounPhrase<'a>,
predicate: &'a LogicExpr<'a>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn wrap_with_definiteness(
&mut self,
definiteness: Option<Definiteness>,
noun: Symbol,
predicate: &'a LogicExpr<'a>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn wrap_with_definiteness_and_adjectives(
&mut self,
definiteness: Option<Definiteness>,
noun: Symbol,
adjectives: &[Symbol],
predicate: &'a LogicExpr<'a>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn wrap_with_definiteness_and_adjectives_and_pps(
&mut self,
definiteness: Option<Definiteness>,
noun: Symbol,
adjectives: &[Symbol],
pps: &[&'a LogicExpr<'a>],
predicate: &'a LogicExpr<'a>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn wrap_with_definiteness_for_object(
&mut self,
definiteness: Option<Definiteness>,
noun: Symbol,
predicate: &'a LogicExpr<'a>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn substitute_pp_placeholder(
&mut self,
pp: &'a LogicExpr<'a>,
var: Symbol,
) -> &'a LogicExpr<'a>;
fn substitute_constant_with_var(
&self,
expr: &'a LogicExpr<'a>,
constant_name: Symbol,
var_name: Symbol,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn substitute_constant_with_var_sym(
&self,
expr: &'a LogicExpr<'a>,
constant_name: Symbol,
var_name: Symbol,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn substitute_constant_with_sigma(
&self,
expr: &'a LogicExpr<'a>,
constant_name: Symbol,
sigma_term: Term<'a>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn find_main_verb_name(&self, expr: &LogicExpr<'a>) -> Option<Symbol>;
fn transform_cardinal_to_group(
&mut self,
expr: &'a LogicExpr<'a>,
) -> Result<&'a LogicExpr<'a>, ParseError>;
fn build_verb_neo_event(
&mut self,
verb: Symbol,
subject_var: Symbol,
object: Option<Term<'a>>,
modifiers: Vec<Symbol>,
) -> &'a LogicExpr<'a>;
}Expand description
Trait for parsing quantified expressions and managing scope.
Provides methods for parsing quantifiers (every, some, no, most), their restrictions, and wrapping expressions with appropriate scope.
Required Methods§
Sourcefn parse_quantified(&mut self) -> Result<&'a LogicExpr<'a>, ParseError>
fn parse_quantified(&mut self) -> Result<&'a LogicExpr<'a>, ParseError>
Parses a quantified expression from a quantifier determiner.
Sourcefn parse_restriction(
&mut self,
var_name: Symbol,
) -> Result<&'a LogicExpr<'a>, ParseError>
fn parse_restriction( &mut self, var_name: Symbol, ) -> Result<&'a LogicExpr<'a>, ParseError>
Parses the restrictor clause for a quantifier.
Sourcefn parse_verb_phrase_for_restriction(
&mut self,
var_name: Symbol,
) -> Result<&'a LogicExpr<'a>, ParseError>
fn parse_verb_phrase_for_restriction( &mut self, var_name: Symbol, ) -> Result<&'a LogicExpr<'a>, ParseError>
Parses a verb phrase as the nuclear scope of a quantifier.
Sourcefn combine_with_and(
&self,
exprs: Vec<&'a LogicExpr<'a>>,
) -> Result<&'a LogicExpr<'a>, ParseError>
fn combine_with_and( &self, exprs: Vec<&'a LogicExpr<'a>>, ) -> Result<&'a LogicExpr<'a>, ParseError>
Combines multiple expressions with conjunction.