compiler

package
v0.0.0-...-4e6bda9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package compiler generates sys descriptions of syscalls, types and resources from textual descriptions.

Package compiler generates sys descriptions of syscalls, types and resources from textual descriptions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeConsts

func DeserializeConsts(data []byte, file string, eh ast.ErrorHandler) map[string]uint64

func DeserializeConstsGlob

func DeserializeConstsGlob(glob string, eh ast.ErrorHandler) map[string]uint64

func SerializeConsts

func SerializeConsts(consts map[string]uint64) []byte

Types

type ConstInfo

type ConstInfo struct {
	Consts   []string
	Includes []string
	Incdirs  []string
	Defines  map[string]string
}

func ExtractConsts

func ExtractConsts(desc *ast.Description, target *targets.Target, eh0 ast.ErrorHandler) *ConstInfo

ExtractConsts returns list of literal constants and other info required const value extraction.

type Prog

type Prog struct {
	Resources   []*prog.ResourceDesc
	Syscalls    []*prog.Syscall
	StructDescs []*prog.KeyedStruct
	// Set of unsupported syscalls/flags.
	Unsupported map[string]bool
}

Prog is description compilation result.

func Compile

func Compile(desc *ast.Description, consts map[string]uint64, target *targets.Target, eh ast.ErrorHandler) *Prog

Compile compiles sys description.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL