Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
58a92bd1
Commit
58a92bd1
authored
Aug 12, 2011
by
Marcel van Lohuizen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exp/norm: generate trie struct in triegen.go for better encapsulation.
R=r, r CC=golang-dev
https://golang.org/cl/4837071
parent
8d19d6bb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
464 additions
and
455 deletions
+464
-455
src/pkg/exp/norm/tables.go
src/pkg/exp/norm/tables.go
+460
-454
src/pkg/exp/norm/trie_test.go
src/pkg/exp/norm/trie_test.go
+1
-1
src/pkg/exp/norm/triedata_test.go
src/pkg/exp/norm/triedata_test.go
+2
-0
src/pkg/exp/norm/triegen.go
src/pkg/exp/norm/triegen.go
+1
-0
No files found.
src/pkg/exp/norm/tables.go
View file @
58a92bd1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/pkg/exp/norm/trie_test.go
View file @
58a92bd1
...
...
@@ -6,7 +6,7 @@ import (
)
// Test data is located in triedata_test.go, generated by maketesttables.
var
testdata
=
&
trie
{
testdataLookup
[
:
],
testdataValues
[
:
]}
var
testdata
=
testdataTrie
// Test cases for illegal runes.
type
trietest
struct
{
...
...
src/pkg/exp/norm/triedata_test.go
View file @
58a92bd1
...
...
@@ -59,3 +59,5 @@ var testdataLookup = [640]uint8{
// Block 0x9, offset 0x240
0x24f
:
0x08
,
}
var
testdataTrie
=
trie
{
testdataLookup
[
:
],
testdataValues
[
:
]}
src/pkg/exp/norm/triegen.go
View file @
58a92bd1
...
...
@@ -206,5 +206,6 @@ func (t *trieNode) printTables(name string) int {
printLookupBlock
(
i
,
index
.
lookupBlocks
[
i
],
0x80
)
}
fmt
.
Print
(
"
\n
}
\n\n
"
)
fmt
.
Printf
(
"var %sTrie = trie{ %sLookup[:], %sValues[:] }
\n\n
"
,
name
,
name
,
name
)
return
nv
*
2
+
ni
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment