1#![warn(missing_docs)]
2#![warn(unreachable_pub)]
3#![doc = include_str!("../README.md")]
4pub mod annotate;
33pub mod bitrange;
34pub mod compile;
35pub mod diagnostic;
36pub mod highlight;
38#[cfg(feature = "unstable-introspect")]
45pub mod introspect;
46pub mod pcode_error;
47pub mod runtime;
48pub mod semantics;
49pub mod source;
50#[cfg(feature = "unstable-syntax")]
57pub mod syntax;
58#[cfg(not(feature = "unstable-syntax"))]
59pub(crate) mod syntax;
60
61mod action;
62pub(crate) mod builder;
63mod constraint;
64mod constructor;
65mod instance;
66mod lint;
67pub(crate) mod objects;
68mod pattern;
69mod pmacro;
70pub(crate) mod raw_parsing;
71mod register_map;
72mod resolve;
73pub(crate) mod spec;
74pub(crate) mod token;
75mod tree;
76
77pub type Size = u32;
82
83pub use annotate::Annotations;
84pub use bitrange::BitRange;
85pub use compile::{CompileOptions, Compiler};
86pub use diagnostic::{CompileError, Diagnostic, DiagnosticCode, DiagnosticLabel, Severity};
87pub use objects::field::{FieldId, FieldTableId};
88pub use pcode_error::{PcodeError, PcodeErrorTy, PcodeResult};
89pub use pcode_types::{
90 BitRangeInfo, InstructionPcode, LabelId, Opcode, PcodeLowerError, PcodeLoweringContext,
91 PcodeOp, PcodePlan, PcodeSink, RegisterId, SPACE_CONST, Space, SpaceId, SpaceType, Varnode,
92 lower_instruction,
93};
94pub use register_map::RegisterSlice;
95pub use runtime::{
96 CompiledSpec, ConstructorMatch, Context, ContextBytes, ContextDatabase, ContextEffect,
97 ContextError, ContextScope, DecodeError, Decoder, DelaySlotError, Exclusion, FieldRef,
98 Instruction, ParamField, RegisterField, RegisterRef, Shape, SpaceRef, SpecFingerprint,
99 SymbolKind, SymbolRef, TableRef, TokenRef,
100};
101pub use semantics::{
102 Builtin, EmitError, InstructionInfo, LocalVarId, PcodeAst, PcodeBinaryOp, PcodeBinop,
103 PcodeDelaySlot, PcodeExpr, PcodeExprKind, PcodeIdent, PcodeLoad, PcodeRange, PcodeSpaceRef,
104 PcodeStatement, PcodeStatementKind, PcodeTarget, PcodeUnaryOp, RangeParam, SemanticsSink,
105};
106pub use source::{
107 BytePos, FileId, FormatChunk, FormatChunkKind, FormatError, FormatLine, FormatLineKind,
108 IncludeEdge, MacroDefinition, MacroDefinitionId, MacroExpansion, MacroExpansionId,
109 PreparedSourceId, PreprocessOptions, SourceDb, SourceOrigin, Span,
110};
111pub use syntax::{AnalysisResult, analyze};
112
113#[cfg(feature = "unstable-syntax")]
117pub use syntax::{
118 AlignmentDef, AttachStrDef, AttachValDef, AttachVarDef, BitRangeDef, BitRangeItem,
119 ConstructorDef, ContextDef, EndiannessDef, FieldDef, IncludeDirective, MacroDef, ParseResult,
120 PcodeOpDef, RegisterDef, SleighFile, SleighItem, SourceIndex, SpaceDef, TokenDef, TriviaToken,
121 UnresolvedAction, UnresolvedDisplayToken, UnresolvedExpr, WithBlockDef, parse,
122};
123pub use token::BitRangeFieldId;
124
125#[cfg(test)]
126mod tests;