1
0
mirror of https://github.com/golang/go synced 2024-11-05 15:56:12 -07:00
Commit Graph

53922 Commits

Author SHA1 Message Date
Robert Griesemer
9bc7b08abb - changed literal syntax to use the convert notation
- fixed issued with function declarations/function literals
- added more tests and fixed existing tests

SVN=118167
2008-05-08 17:12:15 -07:00
Rob Pike
7fbe486b1a use new conversion syntax to simplify test
SVN=118019
2008-05-07 17:34:51 -07:00
Rob Pike
37b8eb4648 fix double declaration of g
SVN=118016
2008-05-07 17:32:58 -07:00
Robert Griesemer
d222c65477 Introduced forward declaration of types per discussion with ken.
A forward-declared (or not yet fully defined) type must be used
to construct (mutually) recursive type declarations. This simplifies
the compiler and resolves the issue at which scope the forward-
declared type is to be declared.

SVN=117770
2008-05-06 10:29:17 -07:00
Rob Pike
f5c0763432 Explain about pointer types for mutually recursive structures.
SVN=117463
2008-05-01 23:51:33 -07:00
Rob Pike
5e391cff2c talk about short, int, long etc.
specify allowed conversions.

SVN=117458
2008-05-01 20:59:31 -07:00
Robert Griesemer
76abea7c6d - fixed a test
- added extra basic type aliases
- added select statement

SVN=117448
2008-05-01 18:48:52 -07:00
Robert Griesemer
d4d19fad2f Fixed a typo (changed ' -> ") and shortened a production name slightly to match the naming convention elsewhere.
SVN=117446
2008-05-01 18:47:44 -07:00
Robert Griesemer
1975ff8b44 - completed syntax for import declarations
- fixed a typo

SVN=117439
2008-05-01 18:14:17 -07:00
Rob Pike
38c083c1ca Require names for return values for functions with complex return types.
SVN=117346
2008-05-01 00:01:45 -07:00
Robert Griesemer
50cea7038b - Added section on type equivalence
- Changed signature syntax: parameter names are always mandatory
- Minor white-space cosmetic changes

SVN=117240
2008-04-29 16:27:11 -07:00
Rob Pike
c1aba41194 fix description of iota to reflect reality.
SVN=117108
2008-04-28 16:19:59 -07:00
Rob Pike
f53db3eaa9 Add description of type conversions.
SVN=116978
2008-04-27 18:32:47 -07:00
Robert Griesemer
1265a0c22d - essentially reverted my change of yesterday with respect to char/string syntax
- fixed indentation in many places
- fixed a couple of typos

SVN=116120
2008-04-18 15:41:59 -07:00
Robert Griesemer
75bbce9e84 - added language to document .() notation
- propose change to char/string productions: I find this easier to read

SVN=116037
2008-04-17 19:06:33 -07:00
Rob Pike
a0d5d8089a Added discussion of new, nil, and initialization.
SVN=116022
2008-04-17 17:03:29 -07:00
Rob Pike
b806ba4d88 Add description of how compiling and linking handle dependencies.
SVN=115807
2008-04-15 16:43:06 -07:00
Rob Pike
8cdb71017a remove noisy print
SVN=114939
2008-04-03 16:59:46 -07:00
Rob Pike
b749038246 Add a rudimentary vector container to ameliorate the inability to allocate dynamic arrays.
SVN=114931
2008-04-03 16:38:21 -07:00
Rob Pike
01764a30fe make digits a string instead of an array of bytes.
use string* to pass it around.

SVN=114795
2008-04-02 21:32:39 -07:00
Ken Thompson
5d6eba80f8 generate an error if the foreward
declaration of a func does not exactly
match the actual (or another foreward)
declaration. the reason is that when
there are 2 declarations of a function,
the names of the parameters are taken
from the first. thus
   func x(a int);
followed by
   func x(b int) { ... }
will have the parameter named "a" and
"b" will be undefined.

SVN=114788
2008-04-02 20:23:01 -07:00
Ken Thompson
87278c26e2 bug36
fixed error in symbol table in
the second forward declaration of
a function.

SVN=114572
2008-04-01 12:48:20 -07:00
Ken Thompson
e73674b291 code to assign nil to an interface
without conversions

SVN=114453
2008-03-31 19:19:37 -07:00
Ken Thompson
5918f80f1a bug31
failed to correctly convert from pointer
to interface in a return statement.

moved ANY from a special type in
chan/map to a basic type.

SVN=114350
2008-03-31 11:50:47 -07:00
Ken Thompson
c69d54e7cd bug28
fix code generation bug in
second index of string slice.

SVN=114255
2008-03-29 16:27:12 -07:00
Ken Thompson
0b62cb61ca fix bug30
automatic declaration leaking
from one function to another

SVN=114252
2008-03-29 15:37:38 -07:00
Ken Thompson
c5c8268a78 SVN=114213 2008-03-28 15:08:58 -07:00
Ken Thompson
2181098189 SVN=114204 2008-03-28 13:56:47 -07:00
Ken Thompson
cb87526ce3 SVN=114202 2008-03-28 13:41:41 -07:00
Rob Pike
e311457488 add script to generate .html from .txt
SVN=114148
2008-03-27 22:11:10 -07:00
Rob Pike
8c1408dd8e Add select statement
SVN=114147
2008-03-27 21:42:25 -07:00
Rob Pike
e118551c29 Fix date stamp
SVN=114123
2008-03-27 17:19:52 -07:00
Rob Pike
4c483aa159 Explain goto constraints.
Add description of 'any'.
Simplify and complete syntax for literals.

SVN=114122
2008-03-27 17:19:17 -07:00
Rob Pike
42d7850608 Basic formatted I/O library plus one support lib.
SVN=113977
2008-03-27 00:06:21 -07:00
Robert Griesemer
d79b17e60a - Make Coco/R-based parser work w/ UTF-8 encoded files even if there is
no (optional) UTF-8 marker present.

SVN=113931
2008-03-26 16:12:43 -07:00
Robert Griesemer
41d34e2451 - fixed my scripts
SVN=113864
2008-03-26 09:50:20 -07:00
Robert Griesemer
2f5b4d9893 - new directory structure
SVN=113851
2008-03-26 09:28:57 -07:00
Rob Pike
67aafa6f57 update document. todo still: array and map literals; syntax for basic literals.
SVN=113815
2008-03-25 23:53:07 -07:00
Robert Griesemer
6caad961fe - added extra escaped chars
SVN=113258
2008-03-19 21:20:25 -07:00
Robert Griesemer
d2490e7419 - Implemented simple rule for optional semicolons:
Semicolons are terminators for statements as in C,
  but if followed by a "}" they are not required.
  This is easy to understand and produces the desired
  result for statements.
- Updated todo.txt.

SVN=113198
2008-03-19 15:45:07 -07:00
Rob Pike
e4ca60eca7 change Main, Init to lower case.
make new() take an optional expression, not expression list.
add an example for new().

SVN=112895
2008-03-17 19:05:07 -07:00
Rob Pike
65348a89b8 SVN=112717 2008-03-16 21:47:38 -07:00
Robert Griesemer
3cdf9c3bff - added another test
- added script to run tests
- fixed primary expression syntax in go.atg

SVN=112281
2008-03-12 15:29:57 -07:00
Robert Griesemer
0908af75cd - added another test case
SVN=112273
2008-03-12 15:10:10 -07:00
Robert Griesemer
fcf5b15cfe - added more test cases
SVN=112271
2008-03-12 14:57:03 -07:00
Robert Griesemer
e31ee76dcb - fixed typo in go_lang.txt
- changed go.atg to make optional semicolons work for statements
- expanded a test case

SVN=112242
2008-03-12 13:12:40 -07:00
Rob Pike
8152cb8a71 examples contradicted text: '\octal' and '\hex' are fixed size
SVN=112150
2008-03-11 20:40:20 -07:00
Robert Griesemer
0d1e90be17 - added 'nil' keyword to lang doc
(did not add 'true' and 'false' because I think these don't need to be
  keywords, they can be recreated from whole cloth)
- added 'new' syntax to expressions
  (this is needed because of the type as 1st argument - the expression
  list is probably not yet implemented, but I think we may want it
  eventually)
- removed optional ';'s in sieve example - make it more concise
- fixed several bugs in go.atg, no parses sieve
- added sieve as test case

SVN=112135
2008-03-11 18:07:22 -07:00
Robert Griesemer
18b829b472 - go.atg now produces a compileable C++ parser when running through coco
- added a first test case
- running make produces a runnable go parser 'go'

SVN=112127
2008-03-11 17:07:25 -07:00
Robert Griesemer
78e4320fdc - changed if/switch initial stat syntax to match go compiler and make
it consistent
- changed declaration syntax to match go compiler

SVN=112122
2008-03-11 16:40:47 -07:00