- more precise wording by having an explicit list of cases
- simplified statement list
R=r
DELTA=16 (10 added, 0 deleted, 6 changed)
OCL=16871
CL=16875
will move elsewhere when more complete.
parses, does not execute.
no character classes yet.
R=rsc
DELTA=522 (522 added, 0 deleted, 0 changed)
OCL=16863
CL=16874
- language for selectors and array/map indices
- formal description of syntax notation used
- factor out common productions to better show
symmetries in grammar
R=r
DELTA=113 (77 added, 13 deleted, 23 changed)
OCL=16853
CL=16865
except in statement list, where it is expressed in words
- allow for empty import, const, type, and var decl lists inside ()'s
- fixed grammar for inc/dec statements
- added empty statement as it appears to be accepted by 6g
R=r
DELTA=75 (23 added, 21 deleted, 31 changed)
OCL=16785
CL=16785
- pointer to interface cannot have methods
- record type names for better runtime error
R=r,ken
DELTA=85 (80 added, 0 deleted, 5 changed)
OCL=16658
CL=16722
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
now that semicolons are in, uncomment forward declaration
of interfaces
R=ken
DELTA=285 (124 added, 114 deleted, 47 changed)
OCL=16638
CL=16646
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
/home/rsc/bin/addsemi and then diff+tweak.
R=r,gri
OCL=16620
CL=16643
type T struct {
next *T
}
and
type T *struct {
next T
}
are valid without needing forward declarations.
add "type T struct" syntax for forward struct declarations.
add "type T interface" syntax, but commented out
(need to fix semicolons first)
R=ken
DELTA=452 (259 added, 115 deleted, 78 changed)
OCL=16580
CL=16584
package flag
export type flag.Flag struct { name flag.string; usage flag.string; \
value flag.Value; next *flag.Flag }
type flag.string string
type flag.Value interface { AsBool () (? *flag.BoolValue); \
AsInt () (? *flag.IntValue); AsString () (? *flag.StringValue); \
IsBool () (? flag.bool); IsInt () (? flag.bool); IsString () (? flag.bool); \
Str () (? flag.string); ValidValue (str flag.string) (? flag.bool) }
type flag.BoolValue struct { val flag.bool; p *flag.bool }
type flag.IntValue struct { val flag.int64; p *flag.int64 }
type flag.StringValue struct { val flag.string; p *flag.string }
type flag.bool bool
func (e *flag.StringValue) AsBool () (? *flag.BoolValue)
func (e *flag.StringValue) AsInt () (? *flag.IntValue)
...
the \ continuations are for this message, not real.
changed delimiter for import from (( )) to $$ $$.
replaced mksys.bash with mksys.c
changed sys.go to use leading export,
fake package name is now SYS not foop
don't always require ; on forward func decls
R=ken,r
DELTA=1827 (446 added, 1083 deleted, 298 changed)
OCL=16433
CL=16463
- typename cannot refer to interface types
- clarified syntax
- added TODO re: type name issue with qualified identifiers
Changed/fixed order of operators/keywords.
R=r
DELTA=10 (3 added, 0 deleted, 7 changed)
OCL=16337
CL=16339
invalid. The receiver type is not permitted to be a pointer
type. Since 6g currently accepts it, this moves the test case
back to the bugs directory.
R=gri
DELTA=22 (11 added, 11 deleted, 0 changed)
OCL=16284
CL=16336