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 ( ...@@ -24,77 +24,77 @@ const (
EOF; EOF;
COMMENT; COMMENT;
literal_beg;
// Identifiers and basic type literals // Identifiers and basic type literals
// (these tokens stand for classes of literals) // (these tokens stand for classes of literals)
literal_beg; IDENT; // main
IDENT; INT; // 12345
INT; FLOAT; // 123.45
FLOAT; CHAR; // 'a'
CHAR; STRING; // "abc"
STRING;
literal_end; literal_end;
// Operators and delimiters
operator_beg; operator_beg;
ADD; // Operators and delimiters
SUB; ADD; // +
MUL; SUB; // -
QUO; MUL; // *
REM; QUO; // /
REM; // %
AND;
OR; AND; // &
XOR; OR; // |
SHL; XOR; // ^
SHR; SHL; // <<
AND_NOT; SHR; // >>
AND_NOT; // &^
ADD_ASSIGN;
SUB_ASSIGN; ADD_ASSIGN; // +=
MUL_ASSIGN; SUB_ASSIGN; // -=
QUO_ASSIGN; MUL_ASSIGN; // *=
REM_ASSIGN; QUO_ASSIGN; // /=
REM_ASSIGN; // %=
AND_ASSIGN;
OR_ASSIGN; AND_ASSIGN; // &=
XOR_ASSIGN; OR_ASSIGN; // |=
SHL_ASSIGN; XOR_ASSIGN; // ^=
SHR_ASSIGN; SHL_ASSIGN; // <<=
AND_NOT_ASSIGN; SHR_ASSIGN; // >>=
AND_NOT_ASSIGN; // &^=
LAND;
LOR; LAND; // &&
ARROW; LOR; // ||
INC; ARROW; // <-
DEC; INC; // ++
DEC; // --
EQL;
LSS; EQL; // ==
GTR; LSS; // <
ASSIGN; GTR; // >
NOT; ASSIGN; // =
NOT; // !
NEQ;
LEQ; NEQ; // !=
GEQ; LEQ; // <=
DEFINE; GEQ; // >=
ELLIPSIS; DEFINE; // :=
ELLIPSIS; // ...
LPAREN;
LBRACK; LPAREN; // (
LBRACE; LBRACK; // [
COMMA; LBRACE; // {
PERIOD; COMMA; // ,
PERIOD; // .
RPAREN;
RBRACK; RPAREN; // )
RBRACE; RBRACK; // ]
SEMICOLON; RBRACE; // }
COLON; SEMICOLON; // ;
COLON; // :
operator_end; operator_end;
// Keywords
keyword_beg; keyword_beg;
// Keywords
BREAK; BREAK;
CASE; CASE;
CHAN; 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