This looks like a nice way of incorporating this sort of error recovery into parser generator tools—include support for synchronization points and capturing errors into the AST as part of the grammar being defined:https://twitter.com/roopeshchander/status/1050026372620529667 …
-
-
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
Wouldn't you want "hot zones", where the rules are laxer in sections last edited by the user?
-
For a deterministic parser at least, you still need to define what those “lax” rules are somehow. It always seemed to me like there would be interesting things you could do with hysteresis in an IDE, but I don’t know of an IDE that does in practice. Too complex I guess?
- Još 11 drugih odgovora
Novi razgovor -
-
-
I wonder how much responsibility language designers have in this. Grammars often get design to “look/feel like X language” when X language didn’t take the time to understand the ramifications of their design on parsing/lexing/layout (yes, this is block comment shade)
-
Me in 2012: You have / and * as operator characters, and you want to be script-friendly, so why don’t we just use # as the comment character __: Then it wouldn’t look like C. Well just special case /*
Kraj razgovora
Novi razgovor -
-
-
This approach works really well for well-defined grammars. Got any advice for parsing things that don’t have a grammar? (I’m thinking about DDMathParser, which uses an operator precedence parser and not some sort of RD or LL(n) parser)
-
I talked about grammars because I figured that'd be the most widely-understood formalism, but I think the high-level points still hold for something like DDMathParser. It looks like users can extend the base grammar in controlled ways, like adding operators or functions
Kraj razgovora
Novi razgovor -
-
-
This is just what I needed to see today! I've got a working parser for my toy language but I'm discovering that even the predictable error cases _dramatically_ outnumber the successes.
-
Glad to hear! There are some good suggestions in the thread too, I should write a followup
Kraj razgovora
Novi razgovor -
-
-
Tweet je nedostupan.
-
Happy to hear it helped. Thank you!
Kraj razgovora
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.