Crate mech

Crate mech 

Source

Re-exports§

pub extern crate mech_core as core;
pub extern crate mech_syntax as syntax;

Modules§

base
compiler
error
expressions
formatter
grammar
graphemes
Unicode grapheme group utilities. Current implementation does not guarantee correct behavior for all possible unicode characters.
kind
literals
map
matrix
mechdown
nodes
parser
program
record
set
state_machines
statements
stdlib
symbol_table
table
tuple
types
value

Macros§

compile_binop
compile_unop
impl_binop
impl_binop_match_arms
impl_fxns
impl_mech_binop_fxn
impl_mech_urnop_fxn
impl_set_range_all_match_arms
impl_set_range_match_arms
impl_unop
impl_urnop_match_arms
label
labelr
print_plan
print_symbols
print_tree

Structs§

Atom
Binding
BlockConfig
Body
ByteCodeHeader
Citation
Comment
CompileCtx
ComplexNumber
ComplexNumberNode
ConstEntry
DictEntry
Emoji
EnumDefine
EnumVariant
F32
F64
Field
Formatter
Fsm
FsmDeclare
FsmImplementation
FsmInstance
FsmPipe
FsmSpecification
FunctionArgument
FunctionCall
FunctionDefine
FunctionDefinition
Functions
Grammar
GrammarIdentifier
Guard
Identifier
Image
ImaginaryNumber
IndexedString
Interpreter
KindAnnotation
KindDefine
Map
Mapping
MarkdownTable
MarkdownTableHeader
Matrix
MatrixColumn
MatrixRow
MechError
MechFileSystem
MechMap
MechRecord
MechRepl
MechServer
MechSet
MechSources
MechString
MechTable
MechTuple
OpAssign
OrderedList
Paragraph
ParseError
The error type for the nom parser, which handles full error context (location + detail) and ownership of the input ParseString.
ParseErrorDetail
The part of error context that’s independent to its cause location.
ParseString
The input type for nom parsers. Instead of holding the actual input string, this struct only holds a reference to that string so that it can be cloned at much lower cost.
ParsedConstEntry
ParsedProgram
ParserErrorContext
PatternTupleStruct
Plan
Program
ProgramState
RangeExpression
RationalNumber
Record
Ref
Rule
Section
Set
Slice
SliceRef
SourceLocation
SourceRange
StateDefinition
Subtitle
SymbolEntry
SymbolTable
Table
TableColumn
TableOfContents
TableRow
Term
TextFormatter
This struct is responsible for analysing text, interpreting indices and ranges, and producing formatted messages.
Title
Token
Tuple
TupleDestructure
TupleStruct
TypeEntry
TypeSection
UserFunction
Var
VariableAssign
VariableDefine
Word

Enums§

AddSubOp
ColumnAlignment
ComparisonOp
ConstEncoding
DecodedInstr
EncodedInstr
ExponentOp
Expression
Factor
FeatureFlag
FeatureKind
FloatDirection
FormulaOperator
FsmArm
GrammarExpression
Kind
Literal
LogicOp
MDList
MechCode
MechErrorKind
MechSourceCode
MulDivOp
Number
OpAssignOp
OpCode
ParagraphElement
Pattern
PipeElement
RangeOp
RealNumber
ReplCommand
SectionElement
SetOp
Statement
Structure
Subscript
TableOp
TokenKind
Transition
TypeTag
Value
ValueKind
VecOp

Constants§

EMOJILIST
WORDLIST

Traits§

CompileConst
ConstElem
CopyMat
MechFunction
MechFunctionCompiler
MechFunctionImpl
NativeFunctionCompiler
PrettyPrint
ToIndex
ToMatrix
ToUsize
ToValue

Functions§

abstract_el
abstract_sigil
add
add_assign_operator
add_sub_operator
alignment_separator
alpha
alpha_token
alphanumeric
ampersand
and
any
any_token
apostrophe
argument_list
assign_operator
asterisk
async_transition_operator
at
atom
backslash
bar
binary_literal
binding
blank_line
body
boolean
box_bl
box_bl_bold
box_bl_round
box_br
box_br_bold
box_br_round
box_cross
box_drawing_char
box_drawing_emoji
box_horz
box_t_bottom
box_t_left
box_t_right
box_t_top
box_tl
box_tl_bold
box_tl_round
box_tr
box_tr_bold
box_tr_round
box_vert
box_vert_bold
brace_subscript
bracket_subscript
call_arg
call_arg_with_binding
caret
carriage_return
carriage_return_new_line
center_alignment
check_list
check_list_item
check_mark
checked_item
citation
clc
code_block
colon
comma
comment
comment_sigil
comparison_operator
complement
complex_number
compress_and_encode
cross
cross_product
dash
decimal_literal
decode_and_decompress
decode_version_from_u16
define_operator
difference
digit
digit_sequence
digit_token
div_assign_operator
divide
dollar
dot_product
dot_subscript
dot_subscript_int
element_of
emoji
emoji_grapheme
emojify
emojify_bytes
emphasis
emphasis := asterisk, +paragraph_element, asterisk ;
emphasis_sigil
empty
empty_map
empty_paragraph
empty_set
encode_value_kind
english_false_literal
english_true_literal
enum_define
enum_separator
enum_variant
enum_variant_kind
equal
equal_to
equation
equation_sigil
escaped_char
eval_inline_mech_code
exclamation
exp_assign_operator
exponent
exponent_operator
expression
factor
false_literal
fancy_table
field
float
float_decimal_start
float_full
float_left
float_literal
float_right
float_sigil
footnote
footnote_prefix
footnote_reference
forbidden_emoji
formula
formula_subscript
fsm
fsm_args
fsm_arm
fsm_async_transition
fsm_block_transition
fsm_declare
fsm_guard
fsm_guard_arm
fsm_implementation
fsm_instance
fsm_output
fsm_pattern
fsm_pipe
fsm_specification
fsm_state_definition
fsm_state_definition_variables
fsm_state_transition
fsm_statement_transition
fsm_transition
fsm_tuple_struct
function_arg
function_call
function_define
function_out_arg
function_out_args
generate_uuid
grammar
grave
greater_than
greater_than_equal
grouping_symbol
guard_operator
hash_bytes
hash_chars
hash_str
hashtag
help
hexadecimal_literal
highlight
highlight := “!!”, +paragraph_element, “!!” ;
highlight_sigil
http_prefix
humanize
humanize_bytes
hyperlink
identifier
img
img_prefix
info_block
info_sigil
inline_code
inline_equation
inline_mech_code
inline_table
inline_table_row
integer_literal
intersection
is
For parser p, return the !!p peek parsing expression.
is_not
For parser p, return the !p peek parsing expression.
kind
kind_annotation
kind_any
kind_atom
kind_define
kind_empty
kind_map
kind_matrix
kind_record
kind_scalar
kind_set
kind_table
kind_tuple
l1
l2
l3
l4
l5
l6
l7
label_with_recovery
Label with recovery function. In addition to upgrading errors, the error is logged and recovery function will be run as an attempt to synchronize parser state.
label_without_recovery
Label without recovery function. Upgrade Err::Error to Err:Failure and override its context information.
left_alignment
left_angle
left_brace
left_bracket
left_parenthesis
less_than
less_than_equal
list_separator
literal
load_program_from_bytes
load_program_from_file
logic_operator
ls
map
mapping
markdown_table
markdown_table_header
markdown_table_no_header
markdown_table_row
markdown_table_with_header
matrix
matrix_column
matrix_end
matrix_multiply
matrix_operator
matrix_row
matrix_solve
matrix_start
max_err
mech_code
mech_code_alt
mech_table_style
mechdown_list
merge_src_range
modulus
mul_assign_operator
mul_div_operator
multiply
negate
negate_factor
new_line
new_line_char
newline_indent
no_alignment
not
not_element_of
not_equal
not_factor
null
Convert output of any parser into ParserNode::Null. Useful for working with alt combinator and error recovery functions.
number
octal_literal
op_assign
op_assign_operator
or
ordered_list
ordered_list_item
output_operator
paragraph
paragraph_element
paragraph_text
parenthetical_term
parse
parse_grammar
parse_mech
parse_repl_command
parse_version_to_u16
percent
period
plus
print_err_report
Print formatted error message.
print_prompt
program
proper_subset
proper_superset
punctuation
query_sigil
question
question_block
quote
quote_block
quote_sigil
range
For parser p, run p and also output the range that p has matched upon success.
range_exclusive
range_expression
range_inclusive
range_operator
range_subscript
rational_literal
raw_hyperlink
read_mech_source_file
real_number
record
reference
regular_table
right_alignment
right_angle
right_brace
right_bracket
right_parenthesis
row_separator
run_mech_code
save_to_file
scientific_literal
section
section_element
section_elements
select_all
semicolon
set
set_operator
skip_empty_mech_directive
skip_nil
skip_spaces
slash
slice
slice_ref
space
space_tab
statement
statement_separator
strict_equal
strict_not_equal
strike_sigil
strikethrough
string
strong
strong_sigil
structure
sub_assign_operator
sublist
subscript
subset
subtitle
subtract
superset
swizzle_subscript
symbol
tab
table_column
table_end
table_header
table_horz
table_row
table_separator
table_start
tag
Return a terminal parsing expression that consumes tag from input.
text
thematic_break
tilde
title
transition_operator
transpose
true_literal
tuple_struct
ul_subtitle
unchecked_item
underline
underline := underscore, +paragraph_element, underscore ;
underline_sigil
underscore
underscore_digit
union_op
unordered_list
unordered_list_item
var
variable_assign
variable_define
verify_crc_trailer_seek
whitespace
whitespace0
whitespace1
whos
wildcard
ws1e
xor

Type Aliases§

ArgumentList
Base
CheckList
Denominator
Dictionary
Exponent
Footnote
FsmArgs
FunctionCompilerTable
FunctionTable
FunctionsRef
Hyperlink
Imaginary
KindTable
MResult
MutableReference
Numerator
ParseResult
Just alias
ParserErrorReport
Part
PatternTuple
Real
Register
Sign
SymbolTableRef
TableHeader
TypeId
UnorderedList
ValRef
Whole