Talk:Compiler/Verifying syntax: Difference between revisions

 
(4 intermediate revisions by 3 users not shown)
Line 14:
 
::Presumably the "not" applies to the relation as a whole, so "not a = b" means "not ( a = b )" and not "( not a ) = b". --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 22:01, 5 January 2020 (UTC)
 
:::Not sure, I would say that is undefined. Putting "not" in a separate rule would give it an unambiguous precedence. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 23:44, 6 January 2020 (UTC)
 
Note the square brackets [] around the [('=' | '<') expr_level_5]. This means that the expression
Line 21 ⟶ 23:
should not be legal (i.e. a non-associative violation).
[] means 0 or 1.
{} means 0 or more. --[[User:Tybalt89|Tybalt89]] ([[User talk:Tybalt89|talk]]) 22:2428, 5 January 2020 (UTC)
 
:Well spotted. Please sign your posts, with <nowiki>--~~~~</nowiki> thanks --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 14:14, 4 January 2020 (UTC)
 
:: I didn't know how to sign :( --[[User:Tybalt89|Tybalt89]] ([[User talk:Tybalt89|talk]]) 22:2428, 5 January 2020 (UTC)
 
This problem is in dire need of a really extensive test suite. --[[User:Tybalt89|Tybalt89]] ([[User talk:Tybalt89|talk]]) 22:2428, 5 January 2020 (UTC)
 
:That should be part of the task spec. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 14:14, 4 January 2020 (UTC)
 
Would it not be better if the EBNF included explicit placement of whitespace characters? As it stands, it seems to me one is left to one's own opinion as to where whitespace is allowed or required. (A separate lexical analysis stage would alleviate this difficulty, but we already have separated lex and parse tasks.) --[[User:Chemoelectric|Chemoelectric]] ([[User talk:Chemoelectric|talk]]) 18:40, 15 October 2022 (UTC)
1,448

edits