style: comment changes and refactoring in state.c

* src/state.h, src/state.c: Comment changes.
(transitions_to): Take a state* as argument.
* src/lalr.h, src/lalr.c: Comment changes.
(initialize_F): Use clear variable names.
This commit is contained in:
Akim Demaille
2019-01-31 06:31:14 +01:00
parent eed9550993
commit 40b5f89ee0
4 changed files with 21 additions and 27 deletions

View File

@@ -83,8 +83,8 @@ typedef size_t goto_number;
/** Index into #from_state and #to_state.
All the transitions that accept a particular variable are grouped
together and GOTO_MAP[I - NTOKENS] is the index in FROM_STATE and
TO_STATE of the first of them. */
together in FROM_STATE and TO_STATE, with indexes from GOTO_MAP[I -
NTOKENS] to GOTO_MAP[I - NTOKENS + 1] - 1 (including both). */
extern goto_number *goto_map;
/** The size of #from_state and #to_state. */
@@ -96,8 +96,8 @@ extern state_number *from_state;
/** State number it leads to. */
extern state_number *to_state;
/** Map a state/symbol pair into its numeric representation. */
goto_number map_goto (state_number s0, symbol_number sym);
/** Find the goto number of the goto from S on non-terminal SYM. */
goto_number map_goto (state_number s, symbol_number sym);
/* goto_follows[i] is the set of tokens following goto i. */
extern bitsetv goto_follows;