summaryrefslogtreecommitdiff
path: root/src/cmd/gc/lex.c
AgeCommit message (Collapse)AuthorFilesLines
2009-12-02gc: make 'invalid rune in string' a little less crypticRuss Cox1-1/+3
Fixes issue 371. R=ken2 http://codereview.appspot.com/164091
2009-11-17install copy predefinedKen Thompson1-0/+1
did not test 386, but should work shouldnt matter if copy is not used R=rsc http://codereview.appspot.com/156055
2009-11-11gc: increase maximum path size in getwd from 100 to 1000.Russ Cox1-2/+2
Fixes issue 31. To try the fix before the next release: hg pull -u R=r1, r http://codereview.appspot.com/154058
2009-11-03document the gc go compilers.Rob Pike1-1/+1
fix the usage message. R=rsc CC=go-dev http://go/go-review/1016033
2009-10-19bug169Russ Cox1-2/+4
R=ken OCL=35899 CL=35899
2009-10-19bug190.Russ Cox1-1/+0
also eliminate float80 dregs R=ken OCL=35894 CL=35896
2009-10-15rename sys functions to runtime,Russ Cox1-2/+2
because they are in package runtime. another step to enforcing package boundaries. R=r DELTA=732 (114 added, 93 deleted, 525 changed) OCL=35811 CL=35824
2009-10-12sort errors by line numberRuss Cox1-7/+4
turn off testdclstack and "not used" errors when there are syntax errors. BUG=2181825 R=ken OCL=35606 CL=35608
2009-10-07better handling of mistaken top-level variableRuss Cox1-17/+7
references during the parsing of :=. the base problem is that when reading a,b,c,d the parser makes those refer to existing variables, which might create a few stub top-level ones for undefined names, but then if a := is the next token, we need to undo those stubs. this was causing problems in multifile packages in which one file used a := variable named rpc and the other imported a package named rpc. R=ken OCL=35446 CL=35446
2009-09-21ideal bools and related fixesRuss Cox1-9/+11
R=ken OCL=34859 CL=34865
2009-09-17check for unused importsRuss Cox1-13/+22
R=ken OCL=34732 CL=34756
2009-09-09defining package block names must overrideRuss Cox1-58/+75
universe block names. BUG=2097244 R=ken OCL=34295 CL=34473
2009-09-09update type switch to match spec.Russ Cox1-0/+1
R=ken OCL=34471 CL=34471
2009-09-08write-only variable _Russ Cox1-0/+10
R=ken OCL=34465 CL=34470
2009-09-03stop using filename for disambiguation within a package.Russ Cox1-25/+0
R=ken OCL=34339 CL=34341
2009-08-19produce diagnostic forRuss Cox1-0/+1
import "fmt" var fmt = 1 R=ken OCL=33556 CL=33561
2009-08-19try to do better line number reportingRuss Cox1-30/+12
in the presence of yacc lookahead. better but still not perfect R=ken OCL=33541 CL=33541
2009-08-12mechanism for putting go types into 6.out symbol table.Russ Cox1-2/+1
no types yet. R=ken OCL=33142 CL=33146
2009-08-12whole-package compilationRuss Cox1-31/+91
R=ken OCL=33063 CL=33095
2009-08-07forward declarations not necessary.Russ Cox1-1/+5
still to do: * initializer cycle detection * nicer error for type checking cycles R=ken OCL=32855 CL=32880
2009-08-04make Syms smaller.Russ Cox1-8/+0
collapse a lot of duplication in dcl.c switch to NodeList* from Dcl* R=ken OCL=32770 CL=32770
2009-07-17baby step: const decls can refer to futureRuss Cox1-0/+5
consts in the same factored block const ( X = Y; Y = 2; ) R=ken OCL=31782 CL=31782
2009-07-17another step toward eliminating forward declarations.Russ Cox1-6/+0
introduce NodeList* type in compiler to replace OLIST. this clarifies where lists can and cannot occur. list append and concatenation are now cheap. the _r rules are gone from yacc. rev and unrev are gone. no more lists of lists. the representation of assignments is a bit clunkier. split into OAS (1=1) and OAS2 (2 or more on one side). delete dead chanrecv3 code. delay construction of func types. R=ken OCL=31745 CL=31762
2009-07-03bug163Russ Cox1-1/+1
R=ken OCL=31149 CL=31149
2009-06-29bug163 bug164 bug166Russ Cox1-4/+7
R=ken OCL=30889 CL=30889
2009-06-25separate local path lookup from standard package directoriesRuss Cox1-10/+26
R=ken OCL=30760 CL=30779
2009-06-25the any fix was too aggressive; allow any in any import.Russ Cox1-3/+6
R=ken OCL=30768 CL=30768
2009-06-25disable "any" except during canned imports.Russ Cox1-0/+13
new flag -A enables it during mkbuiltin. avoids mysterious errors in programs that refer to any accidentally. R=ken OCL=30763 CL=30763
2009-06-18better diagnostics for eof in a string.Ken Thompson1-6/+16
this assumes that embedded newlines are legal in back-quote strings. R=r OCL=30502 CL=30502
2009-06-06implement optional semicolons with help from the lexer,Russ Cox1-2/+42
instead of having to double the type and statement grammars. R=ken OCL=29987 CL=29998
2009-06-06gc: grammar cleanup:Russ Cox1-101/+154
* no longer distinguishes const, var, type, package names. * all the predefined names are not tokens anymore. R=ken OCL=29326 CL=29985
2009-06-05more build refinements:Russ Cox1-4/+6
* use new Make.$GOARCH files in gobuild. * rename 6ar to arch-generic gopack. * place objects in $GOROOT/pkg/$GOOS_$GOARCH (makes cross-compiling easier, and no one ever types these paths by hand anyway). R=r DELTA=29 (6 added, 8 deleted, 15 changed) OCL=29923 CL=29967
2009-06-04fix handling of floating point zero constant 0p+0Russ Cox1-0/+3
R=r DELTA=25 (25 added, 0 deleted, 0 changed) OCL=29875 CL=29875
2009-05-22simplifying grammar: delete LBASETYPE and LACONST.Russ Cox1-23/+18
take 2 R=ken OCL=29304 CL=29306
2009-05-22Automated g4 rollback of changelist 29302.Russ Cox1-18/+23
*** Reason for rollback *** too many files included *** Original change description *** simplifying grammar: delete LBASETYPE and LACONST R=ken OCL=29303 CL=29303
2009-05-22simplifying grammar: delete LBASETYPE and LACONSTRuss Cox1-23/+18
R=ken OCL=29300 CL=29302
2009-05-12no need for compiler to hard-code definition of runtime.Russ Cox1-4/+0
use the actual go source instead. R=r DELTA=90 (66 added, 18 deleted, 6 changed) OCL=28708 CL=28719
2009-05-086g:Russ Cox1-8/+17
new type equality restrictions better handling of renamed packages "sys" is no longer available to programs R=ken OCL=28553 CL=28578
2009-05-08move things out of sys into os and runtimeRuss Cox1-0/+4
R=r OCL=28569 CL=28573
2009-05-066g: generate string data as individual symbols,Russ Cox1-3/+0
so that 6l can discard strings used by dead code. also, for short strings, generate DUPOK global symbols so that references to, say, "%s: %s" in multiple files result in only a single symbol. R=ken OCL=28361 CL=28361
2009-04-09change representation of stringsKen Thompson1-3/+4
R=r OCL=27293 CL=27293
2009-04-08yet another attempt at auto-linkingRuss Cox1-14/+21
store only the original import path string (+ .a) if 6g resolves it to an archive file. let 6l re-resolve the .a at link time. this lets libraries build against an archive in the current directory but get used against an installed archive. R=r OCL=27244 CL=27244
2009-04-02use _f007·filename for func literals.Russ Cox1-2/+10
this avoids problems people have run into with multiple closures in the same package. when preparing filename, only cut off .go, not .anything. this fixes a bug tgs ran into with foo.pb.go and foo.go in the same package. also turn bad identifier chars from filename into underscores: a-b.pb.go => a_b_pb R=ken OCL=27050 CL=27050
2009-04-02use separate lex buf for better errors:Russ Cox1-12/+12
package main func main() { func(){}() + + } x.go:2: syntax error near _f001 becomes x.go:2: syntax error near func R=ken OCL=27047 CL=27047
2009-03-30move portable object routines (especiallyRuss Cox1-8/+4
signature generation) into gc. R=ken OCL=26933 CL=26933
2009-03-30move portable code generation (basic statements) to gc.Russ Cox1-1/+4
R=ken OCL=26929 CL=26929
2009-03-30move alignment calculations into gcRuss Cox1-90/+10
R=ken OCL=26914 CL=26914
2009-03-24throw away most of the compat.h compatibility layerRuss Cox1-3/+3
in favor of the lib9 compatibility layer. no need for two. now that mycreate is gone, .6 files are 0644 not 0755. TBR=r OCL=26679 CL=26679
2009-03-12make 6g constants behave as ken proposes. (i hope.)Russ Cox1-14/+6
various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224
2009-03-12chan flags close/closed installedKen Thompson1-1/+3
runtime not finished. R=r OCL=26217 CL=26217