ModalParsing

Trait ModalParsing 

Source
pub trait ModalParsing<'a, 'ctx, 'int> {
    // Required methods
    fn parse_modal(&mut self) -> Result<&'a LogicExpr<'a>, ParseError>;
    fn parse_aspect_chain(
        &mut self,
        subject_symbol: Symbol,
    ) -> Result<&'a LogicExpr<'a>, ParseError>;
    fn parse_aspect_chain_with_term(
        &mut self,
        subject_term: Term<'a>,
    ) -> Result<&'a LogicExpr<'a>, ParseError>;
    fn token_to_vector(&self, token: &TokenType) -> ModalVector;
}
Expand description

Trait for parsing modal verbs and aspect chains.

Provides methods for interpreting modal auxiliaries (can, must, etc.) with Kripke semantics and handling aspect markers (perfect, progressive).

Required Methods§

Source

fn parse_modal(&mut self) -> Result<&'a LogicExpr<'a>, ParseError>

Parses a modal verb and its scope content.

Source

fn parse_aspect_chain( &mut self, subject_symbol: Symbol, ) -> Result<&'a LogicExpr<'a>, ParseError>

Parses perfect/progressive aspect chain with a symbol subject.

Source

fn parse_aspect_chain_with_term( &mut self, subject_term: Term<'a>, ) -> Result<&'a LogicExpr<'a>, ParseError>

Parses perfect/progressive aspect chain with a term subject.

Source

fn token_to_vector(&self, token: &TokenType) -> ModalVector

Converts a modal token to its semantic vector (domain, force, flavor).

Implementors§

Source§

impl<'a, 'ctx, 'int> ModalParsing<'a, 'ctx, 'int> for Parser<'a, 'ctx, 'int>