Skip to content

Commit 0ca8a12

Browse files
committed
examples/fsyacc-cgrammar.jison: shut up jison about different precedence tokens in single rules where not applicable: same precedence tokens should be listed together in a single %left or %right statement.
Also add the (NOT YET SUPPORTED) `%option test-compile-action-code=none` option to instruct jison to IGNORE/SKIP the grammar action code compile test as the action content is written in an unsupported language - users may want to use this when they use non-native JS, e.g. TypeScript, in jison grammar's action code chunks or elsewhere...
1 parent 0fd385d commit 0ca8a12

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/fsyacc-cgrammar.jison

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,20 +326,21 @@
326326
%left INF_INF SUP_SUP
327327
%left PLUS MINUS
328328
%left STAR SLASH PERCENT CONST RESTRICT VOLATILE
329-
%right EXCLAM TILDE PLUS_PLUS MINUS_MINUS CAST RPAREN ADDROF SIZEOF ALIGNOF
329+
%right EXCLAM TILDE PLUS_PLUS MINUS_MINUS CAST LPAREN RPAREN ADDROF SIZEOF ALIGNOF
330330
%left LBRACKET
331-
%left DOT ARROW LPAREN LBRACE
331+
%left DOT ARROW LBRACE
332332
%right NAMED_TYPE /* We'll use this to handle redefinitions of
333333
* NAMED_TYPE as variables */
334-
%left IDENT
334+
335335

336336
/* Non-terminals informations */
337337

338338
//%start interpret file
339-
//%start interpret
339+
%start interpret
340340
//%start primary_expression
341-
%start paren_attr_list
341+
//%start paren_attr_list
342342

343+
%option test-compile-action-code="none"
343344

344345
%%
345346

0 commit comments

Comments
 (0)