[][src]Crate moore_svlog

This crate implements SystemVerilog for the moore compiler.

Re-exports

pub extern crate moore_svlog_syntax as syntax;

Modules

ast

An abstract syntax tree for SystemVerilog.

cat

The categorizing lexer. Tokenizes an input stream of characters, yielding a stream of newline, whitespace, comment, symbol, and text tokens.

hir

The high-level intermediate representation for SystemVerilog.

lexer

A lexical analyzer for SystemVerilog files, based on IEEE 1800-2009, section 5.

mir

The medium-level intermediate representation for SystemVerilog.

parser

A parser for the SystemVerilog language. Based on IEEE 1800-2009.

port_list

A list of ports on a module, with ANSI/non-ANSI styles resolved.

preproc

A preprocessor for SystemVerilog files that takes the raw stream of tokens generated by a lexer and performs include and macro resolution.

token

Defines all tokens that may result from performing lexical analysis on a SystemVerilog source file. This module is inspired heavily by the tokens used in the Rust compiler.

ty

An implementation of the verilog type system.

typeck
value

Representation of constant values and their operations

Macros

assert_span

Assert that a condition holds, or emit a bug diagnostic and panic.

assert_type

Assert that two types are identical, or emit a bug diagnostic and panic.

bug_span

Emit a bug diagnostic and panic.

database_storage

This macro generates the "query storage" that goes into your database. It requires you to list all of the query groups that you need as well as the queries within those groups. The format looks like so:

query_group

A macro that helps in defining the "context trait" of a given module. This is a trait that defines everything that a block of queries need to execute, as well as defining the queries themselves that are exported for others to use.

Structs

CodeGenerator

A code generator.

Def

A definition in a scope.

DefVis

Visibility of a definition.

GeneratedScopeQueryKey

The arguments passed to the generated_scope query.

GlobalArenas

The arenas that allocate things in the global context.

GlobalContext

The central data structure of the compiler. It stores references to various arenas and tables that store the results of the various computations that have been performed.

GlobalTables

The lookup tables for a global context.

InstDetails

Instantiation details

InstTargetDetails

Instantiation target details

InstVerbosityVisitor

A visitor that emits instantiation details diagnostics.

ModulePortsQueryKey

The arguments passed to the module_ports query.

Name

A name is a lightweight 32 bit tag that refers to a string in a name table. During parsing, encountered strings are inserted into the name table and only the corresponding tag is kept in the token. Names which have their most significant bit set represent case sensitive names, such as for extended identifiers.

NameckQueryKey

The arguments passed to the nameck query.

NodeEnvId

A node id with corresponding parameter environment.

ParamEnv

A parameter environment.

ParamEnvData

A parameter environment.

PortMapping

A port mapping.

QueryStorage

A collection of query caches and runtime data for a QueryDatabase.

Ref

A node reference.

ResolveHierarchicalOrErrorQueryKey

The arguments passed to the resolve_hierarchical_or_error query.

ResolveHierarchicalQueryKey

The arguments passed to the resolve_hierarchical query.

ResolveImportedScopeQueryKey

The arguments passed to the resolve_imported_scope query.

ResolveLocalOrErrorQueryKey

The arguments passed to the resolve_local_or_error query.

ResolveLocalQueryKey

The arguments passed to the resolve_local query.

ResolveNamespaceOrErrorQueryKey

The arguments passed to the resolve_namespace_or_error query.

ResolveNamespaceQueryKey

The arguments passed to the resolve_namespace query.

Rib

One local scope.

Scope

A scope.

ScopeLocation

A location of a node within its enclosing scope.

ScopeLocationQueryKey

The arguments passed to the scope_location query.

Span

A span of locations within a source file, expressed as a half-open interval of bytes [begin,end).

Spanned

A wrapper that associates a span with a value.

StructDef
StructField

Enums

DefNode

A node that generates a definition.

ParamEnvBinding

A binding in a parameter environment.

ParamEnvSource

A location that implies a parameter environment.

PortMappingSource

A location that implies a port mapping.

QueryTag

A tag identifying any of the queries in QueryDatabase.

RibKind

A local scope kind.

Traits

AsScopedNode

Anything that can be converted to a ScopedNode.

BaseContext

The fundamental compiler context.

Context

A collection of compiler queries.

IntoNodeEnvId

A helper trait to allow for easy wrapping of node IDs.

QueryDatabase

A collection of compiler queries.

ScopedNode

Marker trait for AST nodes that generate a scope.

Functions

generated_scope_id

Determine the scope generated by a node.

Type Definitions

Result

A general result returned by the queries.