allkeywords

command
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

all-keywords generates sql/lexbase/keywords.go from sql.y.

It is generically structured with Go templates to allow for quick prototyping of different code generation structures for keyword token lookup. Previous attempts:

Using github.com/cespare/mph to generate a perfect hash function. Was 10% slower. Also attempted to populate the mph.Table with a sparse array where the index correlated to the token id. This generated such a large array (~65k entries) that the mph package never returned from its Build call.

A `KeywordsTokens = map[string]int32` map from string -> token id.

Jump to

Keyboard shortcuts

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