Commit Graph

5 Commits

Author SHA1 Message Date
Robert Griesemer
bf04eefddf - simplified parser by better factoring
R=r
OCL=15539
CL=15542
2008-09-19 12:12:28 -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