Skip to content

Commit

Permalink
fix notes format
Browse files Browse the repository at this point in the history
  • Loading branch information
jievince committed Mar 23, 2022
1 parent 9950369 commit 53c4179
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/parser/parser.yy
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,18 @@ static constexpr size_t kCommentLengthLimit = 256;
%type <boolval> opt_with_properties
%type <boolval> opt_ignore_existed_index

/* Define precedence and associativity of tokens.
* Associativity:
* The associativity of an operator op determines how repeated uses of the operator nest:
* whether ‘x op y op z’ is parsed by grouping x with y first or by grouping y with z first.
* %left specifies left-associativity (grouping x with y first) and %right specifies right-associativity (grouping y with z first).
* %nonassoc specifies no associativity, which means that ‘x op y op z’ is considered a syntax error.
*
* Precedence:
* The precedence of an operator determines how it nests with other operators.
* All the tokens declared in a single precedence declaration have equal precedence and nest together according to their associativity.
* When two tokens declared in different precedence declarations associate, the one declared later has the higher precedence and is grouped first.
*/
// Define precedence and associativity of tokens.
// Associativity:
// The associativity of an operator op determines how repeated uses of the operator nest:
// whether ‘x op y op z’ is parsed by grouping x with y first or by grouping y with z first.
// %left specifies left-associativity (grouping x with y first) and %right specifies right-associativity (grouping y with z first).
// %nonassoc specifies no associativity, which means that ‘x op y op z’ is considered a syntax error.
//
// Precedence:
// The precedence of an operator determines how it nests with other operators.
// All the tokens declared in a single precedence declaration have equal precedence and nest together according to their associativity.
// When two tokens declared in different precedence declarations associate, the one declared later has the higher precedence and is grouped first.

%left QM COLON
%left KW_OR KW_XOR
%left KW_AND
Expand Down
1 change: 1 addition & 0 deletions src/parser/scanner.lex
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ static constexpr size_t MAX_STRING = 4096;
* <LB_STR> accent quoted label, eg. `v2`
* <COMMENT> comment
*/

%x DQ_STR
%x SQ_STR
%x LB_STR
Expand Down

0 comments on commit 53c4179

Please sign in to comment.