Commit Graph

208 Commits

Author SHA1 Message Date
Robert Griesemer
18ed7e690a - accept new composite literal syntax
- remove all parsing heuristics
- as a result, accept a wider syntax, but parser is simpler

R=r
OCL=25029
CL=25029
2009-02-13 16:27:53 -08:00
Robert Griesemer
127526649f - vector package (identical to array except for names)
- updated some file (but not all - left array package in place for now)

R=rsc
DELTA=530  (483 added, 0 deleted, 47 changed)
OCL=25025
CL=25025
2009-02-13 15:07:56 -08:00
Russ Cox
9f8f2e6130 convert composite literals from { } to ( ).
only non-trivial changes are in
	convlit1.go
	golden.out

R=gri
OCL=25019
CL=25024
2009-02-13 14:48:32 -08:00
Robert Griesemer
8e7873672e - fixed bugs related to the empty statement
(now in sync with the spec and with 6g)
- fixed incorrect logging statement in gds

R=r
OCL=24970
CL=24970
2009-02-12 16:06:21 -08:00
Russ Cox
49e2087848 insert type assertions when narrowing.
R=r
OCL=24349
CL=24913
2009-02-11 17:55:16 -08:00
Robert Griesemer
e08cc15251 Some real GDS functionality:
- directory listings w/ working links
- some links working in source code (most don't do the right thing yet)
- use of logging

R=r
OCL=24728
CL=24728
2009-02-09 21:05:14 -08:00
Robert Griesemer
9acd2a9731 snapshot:
- first stab at a Go Documentation Server (gds)
- various fixes to make initial version of gds work

R=r
OCL=24588
CL=24588
2009-02-06 15:26:30 -08:00
Robert Griesemer
187cf78a7c - preparation for setting up types
- moved Object, Type, Scope  out of AST into symboltable
  - moved universe into symboltable
  - removed dead code
- fixed dependency computation (pretty -d filename.go)
- lots of cleanups
- removed tocken channel connection between parser and scanner
  (was cute, but not really needed)

R=r
OCL=24545
CL=24545
2009-02-06 11:10:25 -08:00
Robert Griesemer
89fc8465a8 - caseify parser functions (all but a few should not be exported)
- more elegant tracing code
- removed some dead code, cleanups

R=r
OCL=24452
CL=24452
2009-02-05 14:22:09 -08:00
Robert Griesemer
5d571cc67e snapshot:
- ast statements now use interfaces
- deleted old (now unused) code

R=r
OCL=24422
CL=24422
2009-02-05 11:05:02 -08:00
Robert Griesemer
1595a1947c today's snapshot: steps towards using interfaces for statements in ast
R=r
OCL=24380
CL=24380
2009-02-04 18:28:41 -08:00
Robert Griesemer
c048ee21ad - converted expr representation of ast into a new representation
using interfaces properly => much cleaner code
- converted tracing code to use 'defer' statement
- next steps: convert rest of ast as well

R=r
OCL=24277
CL=24277
2009-02-03 17:44:01 -08:00
Robert Griesemer
b67603dfef - added experimental flag '-def': will print (not parse!)
'def' instead of 'func', 'const', or 'type'

R=r
OCL=24092
CL=24094
2009-02-02 11:51:07 -08:00
Robert Griesemer
6dd93bbfbc - changed pretty parser to parse and print new function type syntax
- added more test cases
- fixed a bug in test script which prevented errors to show up...

R=r
OCL=23832
CL=23974
2009-01-30 15:31:04 -08:00
Robert Griesemer
699721a0ea - removed obsolete files from repository
(most of this has been integrated into pretty,
the rest has been archived).

R=r
OCL=23842
CL=23842
2009-01-29 17:00:18 -08:00
Robert Griesemer
eecce5f130 - make test work with 6g
R=r
OCL=23821
CL=23823
2009-01-29 15:16:22 -08:00
Robert Griesemer
3d4d5ad04c defer statement
R=r
OCL=23542
CL=23542
2009-01-26 17:48:27 -08:00
Robert Griesemer
88da39feea - snapshot before making larger change
R=r
OCL=23403
CL=23403
2009-01-23 13:50:14 -08:00
Robert Griesemer
9e3b0f444a snapshot before making more changes:
- fine-tuning of ast
- more accurate block pos info (improved printing in some cases)
- collecting local variables and fields
- more work on type checking
- lots of minor tweaks

R=r
OCL=23375
CL=23375
2009-01-23 09:44:01 -08:00
Robert Griesemer
96c20204a7 - updated pretty (removed "export")
R=r
OCL=23134
CL=23134
2009-01-20 15:22:33 -08:00
Russ Cox
839a68469b delete export
TBR=r
OCL=23121
CL=23127
2009-01-20 14:40:40 -08:00
Robert Griesemer
626d25065d casify struct fields
R=r
OCL=22998
CL=22998
2009-01-16 15:31:34 -08:00
Russ Cox
360962420c casify, cleanup sys
R=r
OCL=22978
CL=22984
2009-01-16 14:58:14 -08:00
Robert Griesemer
2527bba993 casify pretty
R=r
OCL=22899
CL=22899
2009-01-15 17:16:41 -08:00
Robert Griesemer
2ab55776b5 - fixed untab.go to compile again
R=r
OCL=22871
CL=22871
2009-01-15 15:14:19 -08:00
Robert Griesemer
aa1264472e - added mechanism to detect capitalization issues
Use: pretty -naming files

R=r
OCL=22859
CL=22859
2009-01-15 14:19:35 -08:00
Rob Pike
61f3302044 printf->Printf etc.
the raw fmt routines will be another, smaller but subtler pass.

R=rsc
DELTA=157  (0 added, 0 deleted, 157 changed)
OCL=22851
CL=22851
2009-01-15 13:48:11 -08:00
Robert Griesemer
a0c709bef8 - use new letter definition for pretty
- fixed a bug with error column reporting in the presence of utf-8 chars
- fixed an assertion failure

R=r
OCL=22762
CL=22762
2009-01-14 15:19:34 -08:00
Robert Griesemer
ba556a8818 - removed an unnecessary field from AST.Expr nodes
R=r
OCL=22601
CL=22601
2009-01-12 17:44:10 -08:00
Robert Griesemer
0a0ee89f8b - remove obsolete files (missed before)
R=r
OCL=22475
CL=22475
2009-01-09 16:30:00 -08:00
Robert Griesemer
c620dd9759 - preparation to add type info to ast
- consolidation of files, cleanup
- more success producing idempotent output for some files with comments
  containing tabs
- snapshot of the day

R=r
OCL=22474
CL=22474
2009-01-09 16:28:09 -08:00
Rob Pike
c45d2a767c simplify flag interface. no more BVal etc. you just get a pointer.
fixed everything except the tutorial.

R=rsc
DELTA=404  (94 added, 139 deleted, 171 changed)
OCL=22414
CL=22422
2009-01-09 13:42:46 -08:00
Robert Griesemer
d54abad06f - first (global) idents with proper links to declarations in html output
(e.g. pretty -html source.go > source.html; then look at the html.file in a browser)

R=r
OCL=22331
CL=22331
2009-01-08 14:43:56 -08:00
Robert Griesemer
4dc3d74a36 - fixed a bug with building right-recursive trees iteratively
- moving scope handling into parser (simpler)
- snapshot of work today so far

R=r
OCL=22301
CL=22301
2009-01-08 12:04:00 -08:00
Robert Griesemer
cb13c4d552 - more steps towards tracking idents in scopes
- snapshot of today

R=r
OCL=22247
CL=22247
2009-01-07 16:54:03 -08:00
Robert Griesemer
a3ddf4cfd1 - enabling tracking of declarations
- removed dead code
- snapshot before making a lareger structural change

R=r
OCL=22226
CL=22226
2009-01-07 13:58:56 -08:00
Robert Griesemer
5bd3c3b755 - support for [...] parsing and pretty printing
R=r
OCL=22185
CL=22185
2009-01-06 17:39:25 -08:00
Robert Griesemer
af065a0c77 - make code in gosrc compile again, check in all pending changes
(this code doesn't match the existing language at this point,
  but it's a large code base which compiles - will eventually go
  away)
- enable compilation of it again in run.bash

R=r
DELTA=1147  (534 added, 311 deleted, 302 changed)
OCL=22176
CL=22176
2009-01-06 16:26:45 -08:00
Robert Griesemer
e286260686 - fix parse heuristic: make(x) must accept a type for x
R=r
OCL=22171
CL=22171
2009-01-06 15:30:26 -08:00
Robert Griesemer
9662e7b2db - adjusted pretty to use old new, make
R=r
OCL=22160
CL=22160
2009-01-06 15:01:04 -08:00
Robert Griesemer
215eb7eb7f - steps towards augmenting ast with declaration info
(will help produce html output where we can click on identifiers and
  get to the declaration)
- snapshot before changing back to old new

R=r
OCL=22159
CL=22159
2009-01-06 14:54:18 -08:00
Ian Lance Taylor
4f3506b4ee Update for source code changes.
R=gri
DELTA=15  (13 added, 1 deleted, 1 changed)
OCL=21632
CL=21639
2008-12-19 14:32:00 -08:00
Russ Cox
08ca30bbfa change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion.

TBR=r
OCL=21576
CL=21581
2008-12-19 03:05:37 -08:00
Robert Griesemer
e9741e7dbd fix syntax error (syntax accepted by 6g, but not by pretty printer)
R=r
OCL=21385
CL=21385
2008-12-16 18:08:16 -08:00
Robert Griesemer
003f0ad6af - added missing file
R=r
OCL=21384
CL=21384
2008-12-16 18:03:18 -08:00
Robert Griesemer
b86359073e Snapshot.
Preparations to track identifiers and declarations so that we can
generate good html links as pretty printer output:
- brought over old code and adjusted it
- initial hookups, nothing really running yet

R=r
OCL=21383
CL=21383
2008-12-16 18:02:22 -08:00
Robert Griesemer
c9859e7bc6 - support for range clauses
R=r
OCL=21030
CL=21030
2008-12-11 17:45:45 -08:00
Robert Griesemer
4873bb217c Snapshot:
- fixed html tag generation
- simplified html escaping machinery
  (not 100% correct for strings yet)
- can now produce the first mostly correct formatted html pages from source
  with (fake) links: e.g. pretty -html srcfile.go > srcfile.html
  R=r

OCL=20915
CL=20915
2008-12-10 13:51:19 -08:00
Robert Griesemer
4ad804679d - snapshot if current state
- fix pretty printer to work with new tabwriter interface

R=r
OCL=20854
CL=20854
2008-12-09 15:29:15 -08:00
Robert Griesemer
77aaf4f3a2 - adjusted const decl grammar to reflect spec changes
- first cut at html writer (will do html escaping, html tag production)
- first cut at generating basic html output via pretty
- some cleanups

R=r
OCL=20550
CL=20550
2008-12-04 18:18:41 -08:00