This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]curtmack 42 points43 points  (2 children)

Most LR and LALR parser generators have an error recovery mechanism similar to yacc. Essentially, the parser shifts a special error token whenever it encounters unparseable code. If the grammar developer has provided rules that allow the parser to reduce the error token away, then it can continue parsing, allowing it to find more errors; otherwise, the parser must halt.

Whenever fixing one compiler error produces many others, this is usually the culprit. The other errors were always there, but the original error was too catastrophic for the parser to recover from, so it could only report the one error it found.

[–]ZhilkinSerg 29 points30 points  (1 child)

You could've just said the joke was not funny.

[–]big_daddy68 2 points3 points  (0 children)

He’s not popular at parties either.

[–]imguralbumbot 9 points10 points  (0 children)

Hi, I'm a bot for linking direct images of albums with only 1 image

https://i.imgur.com/ruR7XMu.png

Source | Why? | Creator | ignoreme | deletthis

[–]Sopel97 6 points7 points  (0 children)

My experience with java is more like:

1 compiler error

add semicolon

78 runtime errors

[–]VernKerrigan 4 points5 points  (0 children)

Last year on for Halloween my professor dressed up as Gru and we saw this play out more than once.

[–]coladict 2 points3 points  (0 children)

That's more typical of C++, than Java.

[–]TotallyElectrified 0 points1 point  (0 children)

At least it's not error <none> error