]> Cypherpunks repositories - gostls13.git/commit
[dev.cc] cmd/asm: add lex internal package
authorRob Pike <r@golang.org>
Thu, 22 Jan 2015 18:48:02 +0000 (10:48 -0800)
committerRob Pike <r@golang.org>
Fri, 23 Jan 2015 04:24:57 +0000 (04:24 +0000)
commit86426395754da512cb8017169d1be75dd6aca817
tree2ebc5f924c3ba3d292e591d0b12ea6fd84995616
parent40eb0ed0d80874696589325d33bc4e4aff15184d
[dev.cc] cmd/asm: add lex internal package

Add the lexing code for the new portable assembler.
It is internal to the assembler, so lives in a subdirectory of cmd/asm/internal.

Its only new dependency is the flags package for the assembler, so
add that too; it's trivial. That package manages the command-line
flags in a central place.

The lexer builds on text/scanner to lex the input, including doing a
Plan 9-level implementation of the C preprocessor.

Change-Id: I262e8717b8c797010afaa5051920839906c0dd19
Reviewed-on: https://go-review.googlesource.com/3195
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/asm/internal/flags/flags.go [new file with mode: 0644]
src/cmd/asm/internal/lex/input.go [new file with mode: 0644]
src/cmd/asm/internal/lex/lex.go [new file with mode: 0644]
src/cmd/asm/internal/lex/slice.go [new file with mode: 0644]
src/cmd/asm/internal/lex/stack.go [new file with mode: 0644]
src/cmd/asm/internal/lex/tokenizer.go [new file with mode: 0644]