Commit bd0c13e9 authored by Russ Cox's avatar Russ Cox

documentation edits:

add comments showing Go syntax for each token.
move doc comments below hidden begin constants

R=gri
DELTA=66  (3 added, 3 deleted, 60 changed)
OCL=34334
CL=34445
parent 0421cf07
......@@ -24,77 +24,77 @@ const (
EOF;
COMMENT;
literal_beg;
// Identifiers and basic type literals
// (these tokens stand for classes of literals)
literal_beg;
IDENT;
INT;
FLOAT;
CHAR;
STRING;
IDENT; // main
INT; // 12345
FLOAT; // 123.45
CHAR; // 'a'
STRING; // "abc"
literal_end;
// Operators and delimiters
operator_beg;
ADD;
SUB;
MUL;
QUO;
REM;
AND;
OR;
XOR;
SHL;
SHR;
AND_NOT;
ADD_ASSIGN;
SUB_ASSIGN;
MUL_ASSIGN;
QUO_ASSIGN;
REM_ASSIGN;
AND_ASSIGN;
OR_ASSIGN;
XOR_ASSIGN;
SHL_ASSIGN;
SHR_ASSIGN;
AND_NOT_ASSIGN;
LAND;
LOR;
ARROW;
INC;
DEC;
EQL;
LSS;
GTR;
ASSIGN;
NOT;
NEQ;
LEQ;
GEQ;
DEFINE;
ELLIPSIS;
LPAREN;
LBRACK;
LBRACE;
COMMA;
PERIOD;
RPAREN;
RBRACK;
RBRACE;
SEMICOLON;
COLON;
// Operators and delimiters
ADD; // +
SUB; // -
MUL; // *
QUO; // /
REM; // %
AND; // &
OR; // |
XOR; // ^
SHL; // <<
SHR; // >>
AND_NOT; // &^
ADD_ASSIGN; // +=
SUB_ASSIGN; // -=
MUL_ASSIGN; // *=
QUO_ASSIGN; // /=
REM_ASSIGN; // %=
AND_ASSIGN; // &=
OR_ASSIGN; // |=
XOR_ASSIGN; // ^=
SHL_ASSIGN; // <<=
SHR_ASSIGN; // >>=
AND_NOT_ASSIGN; // &^=
LAND; // &&
LOR; // ||
ARROW; // <-
INC; // ++
DEC; // --
EQL; // ==
LSS; // <
GTR; // >
ASSIGN; // =
NOT; // !
NEQ; // !=
LEQ; // <=
GEQ; // >=
DEFINE; // :=
ELLIPSIS; // ...
LPAREN; // (
LBRACK; // [
LBRACE; // {
COMMA; // ,
PERIOD; // .
RPAREN; // )
RBRACK; // ]
RBRACE; // }
SEMICOLON; // ;
COLON; // :
operator_end;
// Keywords
keyword_beg;
// Keywords
BREAK;
CASE;
CHAN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment