TokenType

Enum TokenType 

Source
pub enum TokenType {
Show 190 variants BlockHeader { block_type: BlockType, }, All, No, Some, Any, Both, Most, Few, Many, Cardinal(u32), AtLeast(u32), AtMost(u32), Anything, Anyone, Nothing, Nobody, NoOne, Nowhere, Ever, Never, And, Or, If, Then, Not, Iff, Because, Must, Shall, Should, Can, May, Cannot, Would, Could, Might, Had, Let, Set, Return, Be, While, Repeat, For, In, From, Assert, Trust, Otherwise, Call, New, Either, Inspect, Native, Given, Prove, Auto, Read, Write, Console, File, Give, Show, Push, Pop, Copy, Through, Length, At, Add, Remove, Contains, Union, Intersection, Inside, Zone, Called, Size, Mapped, Attempt, Following, Simultaneously, Spawn, Send, Await, Portable, Manifest, Chunk, Shared, Merge, Increase, Decrease, Tally, SharedSet, SharedSequence, CollaborativeSequence, SharedMap, Divergent, Append, Resolve, RemoveWins, AddWins, YATA, Values, Check, Listen, NetConnect, Sleep, Sync, Mount, Persistent, Combined, Launch, Task, Pipe, Receive, Stop, Try, Into, First, After, Colon, Indent, Dedent, Newline, Noun(Symbol), Adjective(Symbol), NonIntersectiveAdjective(Symbol), Adverb(Symbol), ScopalAdverb(Symbol), TemporalAdverb(Symbol), Verb { lemma: Symbol, time: Time, aspect: Aspect, class: VerbClass, }, ProperName(Symbol), Ambiguous { primary: Box<TokenType>, alternatives: Vec<TokenType>, }, Performative(Symbol), Exclamation, Article(Definiteness), Auxiliary(Time), Is, Are, Was, Were, That, Who, What, Where, When, Why, Does, Do, Identity, Equals, Reflexive, Reciprocal, Respectively, Pronoun { gender: Gender, number: Number, case: Case, }, Preposition(Symbol), Particle(Symbol), Comparative(Symbol), Superlative(Symbol), Than, To, PresupTrigger(PresupKind), Focus(FocusKind), Measure(MeasureKind), Number(Symbol), StringLiteral(Symbol), CharLiteral(Symbol), Item, Items, Possessive, LParen, RParen, LBracket, RBracket, Comma, Period, Plus, Minus, Star, Slash, Percent, Lt, Gt, LtEq, GtEq, EqEq, NotEq, Arrow, EOF,
}

Variants§

§

BlockHeader

Fields

§block_type: BlockType
§

All

§

No

§

Some

§

Any

§

Both

§

Most

§

Few

§

Many

§

Cardinal(u32)

§

AtLeast(u32)

§

AtMost(u32)

§

Anything

§

Anyone

§

Nothing

§

Nobody

§

NoOne

§

Nowhere

§

Ever

§

Never

§

And

§

Or

§

If

§

Then

§

Not

§

Iff

§

Because

§

Must

§

Shall

§

Should

§

Can

§

May

§

Cannot

§

Would

§

Could

§

Might

§

Had

§

Let

§

Set

§

Return

§

Be

§

While

§

Repeat

§

For

§

In

§

From

§

Assert

§

Trust

Documented assertion with justification string.

§

Otherwise

§

Call

§

New

Constructor keyword for struct instantiation.

§

Either

Sum type definition keyword.

§

Inspect

Pattern matching statement keyword.

§

Native

Native function modifier for FFI bindings.

§

Given

Premise marker in theorem blocks.

§

Prove

Goal marker in theorem blocks.

§

Auto

Automatic proof strategy directive.

§

Read

“Read input from…”

§

Write

“Write x to file…”

§

Console

“…from the console”

§

File

“…from file…” or “…to file…”

§

Give

Move ownership: “Give x to processor”

§

Show

Immutable borrow: “Show x to console”

§

Push

“Push x to items”

§

Pop

“Pop from items”

§

Copy

“copy of slice” → slice.to_vec()

§

Through

“items 1 through 3” → inclusive slice

§

Length

“length of items” → items.len()

§

At

“items at i” → items[i]

§

Add

“Add x to set” (insert)

§

Remove

“Remove x from set”

§

Contains

“set contains x”

§

Union

“a union b”

§

Intersection

“a intersection b”

§

Inside

“Inside a new zone…”

§

Zone

“…zone called…”

§

Called

“…called ‘Scratch’”

§

Size

“…of size 1 MB”

§

Mapped

“…mapped from ‘file.bin’”

§

Attempt

“Attempt all of the following:” → concurrent (async, I/O-bound)

§

Following

“the following”

§

Simultaneously

“Simultaneously:” → parallel (CPU-bound)

§

Spawn

“Spawn a Worker called ‘w1’” → create agent

§

Send

“Send Ping to ‘agent’” → send message to agent

§

Await

“Await response from ‘agent’ into result” → receive message

§

Portable

“A Message is Portable and has:” → serde derives

§

Manifest

“the manifest of Zone” → FileSipper manifest

§

Chunk

“the chunk at N in Zone” → FileSipper chunk

§

Shared

“A Counter is Shared and has:” → CRDT struct

§

Merge

“Merge remote into local” → CRDT merge

§

Increase

“Increase x’s count by 10” → GCounter increment

§

Decrease

“Decrease x’s count by 5” → PNCounter decrement

§

Tally

“which is a Tally” → PNCounter type

§

SharedSet

“which is a SharedSet of T” → ORSet type

§

SharedSequence

“which is a SharedSequence of T” → RGA type

§

CollaborativeSequence

“which is a CollaborativeSequence of T” → YATA type

§

SharedMap

“which is a SharedMap from K to V” → ORMap type

§

Divergent

“which is a Divergent T” → MVRegister type

§

Append

“Append x to seq” → RGA append

§

Resolve

“Resolve x to value” → MVRegister resolve

§

RemoveWins

“(RemoveWins)” → ORSet bias

§

AddWins

“(AddWins)” → ORSet bias (default)

§

YATA

“(YATA)” → Sequence algorithm

§

Values

“x’s values” → MVRegister values accessor

§

Check

“Check that user is admin” → mandatory runtime guard

§

Listen

“Listen on [addr]” → bind to network address

§

NetConnect

“Connect to [addr]” → dial a peer (NetConnect to avoid conflict)

§

Sleep

“Sleep N.” → pause execution for N milliseconds

§

Sync

“Sync x on ‘topic’” → automatic CRDT replication

§

Mount

“Mount x at [path]” → load/create persistent CRDT from journal

§

Persistent

“Persistent Counter” → type wrapped with journaling

§

Combined

“x combined with y” → string concatenation

§

Launch

“Launch a task to…” → spawn green thread

§

Task

“a task” → identifier for task context

§

Pipe

“Pipe of Type” → channel creation

§

Receive

“Receive from pipe” → recv from channel

§

Stop

“Stop handle” → abort task

§

Try

“Try to send/receive” → non-blocking variant

§

Into

“Send value into pipe” → channel send

§

First

“Await the first of:” → select statement

§

After

“After N seconds:” → timeout branch

§

Colon

§

Indent

§

Dedent

§

Newline

§

Noun(Symbol)

§

Adjective(Symbol)

§

NonIntersectiveAdjective(Symbol)

§

Adverb(Symbol)

§

ScopalAdverb(Symbol)

§

TemporalAdverb(Symbol)

§

Verb

Fields

§lemma: Symbol
§time: Time
§aspect: Aspect
§

ProperName(Symbol)

§

Ambiguous

Lexically ambiguous token (e.g., “fish” as noun or verb).

The parser tries the primary interpretation first, then alternatives if parsing fails. Used for parse forest generation.

Fields

§primary: Box<TokenType>
§alternatives: Vec<TokenType>
§

Performative(Symbol)

§

Exclamation

§

Article(Definiteness)

§

Auxiliary(Time)

§

Is

§

Are

§

Was

§

Were

§

That

§

Who

§

What

§

Where

§

When

§

Why

§

Does

§

Do

§

Identity

§

Equals

§

Reflexive

§

Reciprocal

§

Respectively

Pairwise list coordination: “A and B respectively love C and D”

§

Pronoun

Fields

§gender: Gender
§number: Number
§case: Case
§

Preposition(Symbol)

§

Particle(Symbol)

§

Comparative(Symbol)

§

Superlative(Symbol)

§

Than

§

To

§

PresupTrigger(PresupKind)

§

Focus(FocusKind)

§

Measure(MeasureKind)

§

Number(Symbol)

§

StringLiteral(Symbol)

String literal: "hello world"

§

CharLiteral(Symbol)

§

Item

§

Items

§

Possessive

§

LParen

§

RParen

§

LBracket

§

RBracket

§

Comma

§

Period

§

Plus

§

Minus

§

Star

§

Slash

§

Percent

§

Lt

<

§

Gt

>

§

LtEq

<=

§

GtEq

>=

§

EqEq

==

§

NotEq

!=

§

Arrow

Arrow for return type syntax: ->

§

EOF

Implementations§

Source§

impl TokenType

Source

pub const WH_WORDS: &'static [TokenType]

Source

pub const MODALS: &'static [TokenType]

Trait Implementations§

Source§

impl Clone for TokenType

Source§

fn clone(&self) -> TokenType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TokenType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for TokenType

Source§

fn eq(&self, other: &TokenType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for TokenType

Source§

impl StructuralPartialEq for TokenType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V