View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001243 | Ecere SDK | compiler | public | 2022-01-07 13:31 | 2022-01-11 11:13 |
Reporter | mingodad | Assigned To | jerome | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | confirmed | Resolution | open | ||
Platform | -crossplatform | OS | - | OS Version | - |
Summary | 0001243: Missing grammar.y update after changing RESTRICT | ||||
Description | On this commit https://github.com/ecere/ecere-sdk/commit/61090b7b04d88ff76c9f66eff72aeb063cebc262 it seems that it was forgotten to also update grammar.y till today, actually we have the references bellow on grammar.y but no mention for recognizing "RESTRICT" tokens on the lexer. I found this while trying to generate railroad diagram for the grammar through https://www.bottlecaps.de/convert/ and https://www.bottlecaps.de/rr/ui . ==== storage_class_specifier ::= 'typedef' | 'extern' | 'static' | '__thread' | 'auto' | 'register' | RESTRICT ... external_storage_class_specifier ::= 'typedef' | 'extern' | 'static' | '__thread' | 'auto' | 'register' | RESTRICT ... ==== | ||||
Tags | grammar | ||||
|
@mingodad Thank you for reporting this. You might want to check out our latest (possibly somehwat outdated) railroad diagram at https://ec-lang.org/grammar/ as well. |
|
Thank you for the link ! Why not this link is on the home page ? Where is the EBNF for it ? Could you fix this issue and update the railroad diagram ? Cheers ! |
|
Isn't this number of conflicts a bit high ? Bison says: ===== grammar.y: warning: 3284 shift/reduce conflicts [-Wconflicts-sr] grammar.y: warning: 1493 reduce/reduce conflicts [-Wconflicts-rr] ===== ยท$ bison-nb --defines=grammar.h --locations --report=lookahead --verbose grammar.y -o grammar.ec grammar.y:375.25: warning: stray '$' [-Wother] 375 | Compiler_Error($"Not a type: %s\n", $1.string); | ^ grammar.y:1711.95: warning: stray '$' [-Wother] 1711 | ...er_Error($"l-value expected\n"); $$ = MkExpOp($1, $2, $3); $$.loc ... | ^ grammar.y:1712.96: warning: stray '$' [-Wother] 1712 | ...er_Error($"l-value expected\n"); $$ = MkExpOp($1, $2, $3); $$.loc ... | ^ grammar.y:3066.27: warning: stray '$' [-Wother] 3066 | Compiler_Warning($"extra comma\n"); | ^ grammar.y:3084.27: warning: stray '$' [-Wother] 3084 | Compiler_Warning($"extra comma\n"); | ^ grammar.y:3297.68: warning: stray '$' [-Wother] 3297 | labeled_statement_error { $$ = $1; Compiler_Error($"... | ^ grammar.y:3298.63: warning: stray '$' [-Wother] 3298 | | iteration_statement_error { $$ = $1; Compiler_Error($"synta... | ^ grammar.y:3299.63: warning: stray '$' [-Wother] 3299 | | compound_statement_error { $$ = $1; Compiler_Error($"synta... | ^ grammar.y:3300.68: warning: stray '$' [-Wother] 3300 | | selection_statement_error { $$ = $1; Compiler_Error($"... | ^ grammar.y:3301.63: warning: stray '$' [-Wother] 3301 | | jump_statement_error { $$ = $1; Compiler_Error($"synta... | ^ grammar.y:3302.68: warning: stray '$' [-Wother] 3302 | | jump_statement error { $$ = $1; Compiler_Error($"... | ^ grammar.y:3303.67: warning: stray '$' [-Wother] 3303 | | expression_error { $$ = MkExpressionStmt($1); Compiler_Error($"s... | ^ grammar.y: warning: 3284 shift/reduce conflicts [-Wconflicts-sr] grammar.y: warning: 1493 reduce/reduce conflicts [-Wconflicts-rr] grammar.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples |
|
Also "compiler/libec/src/expression.y" and "compiler/libec/src/type.y" that seems to be a subset of "compiler/libec/src/grammar.y" are out of sync between then. |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-01-07 13:31 | mingodad | New Issue | |
2022-01-07 13:31 | mingodad | Tag Attached: grammar | |
2022-01-10 02:25 | jerome | Assigned To | => jerome |
2022-01-10 02:25 | jerome | Status | new => confirmed |
2022-01-10 02:25 | jerome | Note Added: 0001499 | |
2022-01-10 10:45 | mingodad | Note Added: 0001502 | |
2022-01-10 17:21 | mingodad | Note Added: 0001513 | |
2022-01-11 11:13 | mingodad | Note Added: 0001514 |