Commit Graph

66 Commits

Author SHA1 Message Date
Robert Griesemer
3548350d3e Snapshot.
Added support for function literals, composite literals.
Bug fixes.

R=r
OCL=15911
CL=15911
2008-09-25 17:20:39 -07:00
Robert Griesemer
8415280699 - more missing constructs added
- removed excessive ";"'s
- no ()'s around expressions where not needed
- parser.go now reproduced and parseable again

R=r
OCL=15881
CL=15881
2008-09-25 15:14:26 -07:00
Robert Griesemer
c51195386e snapshot: more pretty printer stuff
R=r
OCL=15863
CL=15863
2008-09-25 11:50:34 -07:00
Robert Griesemer
2a19d7dc42 - added names to result signatures to make it compile with gccgo
- adjusted the makefile to explicitly compile flag.go and fmt.go for gccgo

R=r
OCL=15822
CL=15822
2008-09-24 22:01:52 -07:00
Robert Griesemer
c5a29a6dd4 - more ast buidling and printing
- almost complete language reproduced

R=r
OCL=15801
CL=15801
2008-09-24 15:50:28 -07:00
Robert Griesemer
83267dce11 - added initial formatting: indentation
- more AST nodes built and printed

R=r
OCL=15735
CL=15735
2008-09-23 18:34:17 -07:00
Robert Griesemer
09bed25621 - snapshot of pretty printer status
- parts of AST built and printed
- no formatting yet

R=r
OCL=15727
CL=15727
2008-09-23 16:40:12 -07:00
Robert Griesemer
b390608636 - added gccgo makefile
R=r
OCL=15693
CL=15695
2008-09-23 11:17:44 -07:00
Robert Griesemer
c13c03c261 - first cut at building and printing AST
R=r
OCL=15675
CL=15675
2008-09-22 18:26:12 -07:00
Robert Griesemer
d910e90edd - heuristics for parsing composite literals in some cases
- fixed result parsing of function types

R=r
OCL=15585
CL=15585
2008-09-19 18:06:53 -07:00
Robert Griesemer
bf04eefddf - simplified parser by better factoring
R=r
OCL=15539
CL=15542
2008-09-19 12:12:28 -07:00
Robert Griesemer
26adb31c30 - fix for out-of-bounds error found by rsc
- removed tests that may have wrong Go code from Makefile

R=r
OCL=15532
CL=15532
2008-09-19 10:56:35 -07:00
Robert Griesemer
6e08991eba - fixed another parser bug, now correctly parse more tests
R=r
OCL=15518
CL=15518
2008-09-18 23:30:32 -07:00
Robert Griesemer
2b70c6add3 - fixed old test cases with wrong syntax
- added more test cases to Makefile
- fixed another parser issue (possibly a 6g bug - to be tracked down)

R=r
OCL=15516
CL=15516
2008-09-18 23:09:07 -07:00
Robert Griesemer
a1ee6804dd - fixed bug which prevented parser.go from compiling
(typo in ptr decl lead to an unresolved forward declaration)
- fixed parser bugs
- fixed Makefile
- now successfully parses most code

Issues:
- composite literals (cannot be identified easily from syntax alone)
- new(T, ...) (cannot be identified easily from syntax alone since
  new is not a keyword and thus could be a different function then
  the allocation function at which point "new((x + y))" is legal,
  but the inner "(x" looks like the beginning of a function type)

R=r
OCL=15515
CL=15515
2008-09-18 22:53:54 -07:00
Robert Griesemer
81d7c51837 First cut at a Go pretty printer:
- code scavenged from Go-in-Go front-end (will merge back)
- using "symbol-table" free parsing to build AST
- no printing yet

R=r
OCL=15504
CL=15504
2008-09-18 16:58:37 -07:00