[Question]
  [
As part of [his answer to *Make an Error Quine!*](https://codegolf.stackexchange.com/a/36262), @Falko proposed the following algorithm:
> 
> ## How to create your own solution in 2 minutes?
> 
> 
> 1. Open a new file in an IDE of your choice.
> 2. Bang your head onto the keyboard in front of you.
> 3. Compile.
> 4. Replace the code with the compiler error message.
> 5. Repeat steps 3 and 4 until the code converges.
> 
> 
> I bet such a procedure terminates pretty quickly in most cases!
> 
> 
> 
### Task
Your task is to prove him wrong.
Write a full program that satisfies the following:
1. When compiled or interpreted, it produces an error message that, when compiled or interpreted in turn, also results in an error message.
2. Repeating step 1 over and over again will eventually encounter a fixed point, i.e., an error quine.
### Additional rules
* The final error message must have a positive length. However, the previous error messages and the original source code may be empty.
* The original source code's length may not exceed 1024 bytes.
* Neither the original code or the code generated in any of the steps may produce non-error output.
The output has to be clearly identifiable as an error message, which has to be generated by the compiler/interpreter due to a syntax error, runtime error, undefined reference, etc.
* Your program may not receive any input or require any flags to produce the loop.
* Your program may rely on a specific implementation of its language or version thereof.
### Scoring
Your score is the **finite** number of steps your source code requires before producing an error quine. The submission with the highest score wins.
The length of the original source code will be used as tie breaker. Shorter is better.
### Example
In [Chicken](http://torso.me/chicken "Chicken chicken chicken: chicken chicken"), the program
generates the following error message:
```
TypeError: Cannot read property 'NaN' of undefined
```
If this error message is, in turn, interpreted, it produces the error message
```
Error on line 1: expected 'chicken'
```
which, if interpreted in turn, produces itself.
Thus, the score of the empty Chicken program is 2.
### Counterexample
The PHP code
```
ab<?=c
```
generates the error message
```
PHP Parse error:  syntax error, unexpected '?' in Command line code on line 1
```
which produces itself when interpreted.
However, the second source code prints the message to STDOUT, making this sequence invalid.
  
[Answer]
# Bash, 9223372036854775810
Inspired by Doorknob's answer.
```
a='"2>/dev/null;if(((i=$((i-1)))>0));then $(declare -p a);$a;else 1;fi #"'
i=2**63
eval $a
```
It should be run with `bash < file.sh`, or use the same file name for each program, to get rid of the different file names in the error messages.
The first few errors are (with `LANG=C`):
```
bash: line 3: 2>/dev/null;if(((i=9223372036854775807)>0));then declare -- a="\"2>/dev/null;if(((i=\$((i-1)))>0));then \$(declare -p a);\$a;else 1;fi #\"";"2>/dev/null;if(((i=$((i-1)))>0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory
```
```
bash: line 1: 2>/dev/null;if(((i=9223372036854775806)>0));then declare -- a="\"2>/dev/null;if(((i=\$((i-1)))>0));then \$(declare -p a);\$a;else 1;fi #\"";"2>/dev/null;if(((i=$((i-1)))>0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory
```
```
bash: line 1: 2>/dev/null;if(((i=9223372036854775805)>0));then declare -- a="\"2>/dev/null;if(((i=\$((i-1)))>0));then \$(declare -p a);\$a;else 1;fi #\"";"2>/dev/null;if(((i=$((i-1)))>0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory
```
And finally:
```
bash: line 1: 2>/dev/null;if(((i=0)>0));then declare -- a="\"2>/dev/null;if(((i=\$((i-1)))>0));then \$(declare -p a);\$a;else 1;fi #\"";"2>/dev/null;if(((i=$((i-1)))>0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory
```
```
bash: line 1: 1: command not found
```
```
bash: line 1: bash:: command not found
```
which is an error quine.
[Answer]
# [Pip 0.15.05.29](https://github.com/dloscutoff/pip/commit/063bf12392a59c64c129cfb973204b69a10f0b32), over 10100,000
*Technically not valid* because it requires the `-w` flag for warning output. That being said, Pip by design doesn't display any runtime errors unless they actually crash the program (infinite recursion, e.g.); the problems with this code are things that other languages would definitely complain about.
```
i:5**6**7d:"i:1d: Ssi?dRo--iRsRPda"Ssi?dRo--iRsRPda
```
The exact number of steps depends only on the value assigned to `i`, so it could be arbitrarily large (until the Python interpreter runs out of memory). Also, it would take longer than the age of the universe to complete the above sequence. (The question *did* specify "slow"!)
**Explanation:**
It took some combing through the interpreter before I found an error that would let me put arbitrary code into the warning message. After that, it was essentially modifying standard quine techniques. Example here uses an `i`-value of `5` for purposes of explanation.
```
i:5d:"i:1d: Ssi?dRo--iRsRPda"Ssi?dRo--iRsRPda
```
After setting `i`, store a string in `d` and then attempt to execute the `S`wap statement. Swap expects two variables (more accurately, lvalues). `s` is fine, but the second expression is `i?dRo--iRsRPda`. If `i` is true (nonzero, for our purposes), the ternary evaluates to `dRo--iRsRPd`, which uses `d` from earlier to form a near-quine--only with `i` decremented. This expression is not an lvalue, so Pip complains:
```
Attempting to swap non-lvalue i:4d:"i:1d: Ssi?dRo--iRsRPda"Ssi?dRo--iRsRPda
```
... which then starts the whole thing over again. (`Attempting to swap non-lvalue` is a bunch of no-ops: `At` calculates the ASCII value of `t = 10`, `n-l` subtracts newline minus each value of an empty list, and all the lowercase letters are just variables.)
The process continues in like fashion all the way down to:
```
Attempting to swap non-lvalue i:0d:"i:1d: Ssi?dRo--iRsRPda"Ssi?dRo--iRsRPda
```
When this is run, `i` is now false. The ternary expression evaluates to the else branch `a`--which is an lvalue. Thus, swap doesn't complain anymore. Instead, we get:
```
Referencing uninitialized variable a
```
And upon running this, at last, we have an actual syntax error:
```
R is not a unary operator
Fatal error while parsing, execution aborted.
```
... at which point, since the "program" starts with `R`, Pip will continue complaining that `R` is not a unary operator forever.
---
The best solution that doesn't use `-w` is of length 3:
```
$~
While scanning, ignored unrecognized character: '~'
Missing operator for $ meta-operator? Got None instead
Fatal error while parsing, execution aborted.
Missing operator for $ meta-operator? Got m instead
Fatal error while parsing, execution aborted.
M is not a unary operator
Fatal error while parsing, execution aborted.
```
[Answer]
# Julia, 3
A simple one just to get the ball rolling...
Initial program:
```
inquisition
```
Error 1:
```
inquisition not defined
```
It may not be defined, but if it's *Spanish*, it's also unexpected. Nobody expects the Spanish Inquisition.
Error 2:
```
syntax: extra token "not" after end of expression
```
Error 3:
```
syntax: extra token "token" after end of expression
```
The third error message, when submitted as a program, produces that same error, hence the score of 3.
Work in progress! Surely I can do better than 3.
[Answer]
# R, 5
Initial program:
```
1i*"5"
```
Error 1:
```
Error in (0+1i) * "5" : non-numeric argument to binary operator
```
Error 2:
```
Error: unexpected 'in' in "Error in"
```
Error 3:
```
Error: unexpected string constant in "Error 'in'"
```
Error 4:
```
Error: unexpected symbol in "Error: unexpected string"
```
Error 5 (Quine):
```
Error: unexpected symbol in "Error: unexpected symbol"
```
[Answer]
# Bash, 3
```
cp
```
Very rudimentary shell script to test it:
```
llama@llama:~$ s=$(bash -c 'cp' 2>&1); olds=asdf; while [ "$s" != "$olds" ]; do echo $s; echo '-----'; olds=$s; s=$(bash -c $s 2>&1); done 
cp: missing file operand
Try 'cp --help' for more information.
-----
bash: cp:: command not found
bash: line 1: Try: command not found
-----
bash: bash:: command not found
bash: line 1: bash:: command not found
-----
```
[Answer]
# Ruby, 5
### Initial Program
```
q
```
### 1
```
undefined local variable or method `q' for #<Context:0x00000001045d70>
(repl):1:in `initialize'
```
### 2
```
(repl):2: syntax error, unexpected tIDENTIFIER, expecting end-of-input
(repl):1:in `initialize'
                       ^
```
### 3
```
(repl):1: syntax error, unexpected ':', expecting end-of-input
(repl):2: syntax error, unexpected t...
       ^
```
### 4
```
(repl):1: syntax error, unexpected ':', expecting end-of-input
(repl):1: syntax error, unexpected ':', expecting end-of-input
       ^
```
### 5 (Quine)
```
(repl):1: syntax error, unexpected ':', expecting end-of-input
(repl):1: syntax error, unexpected ':', expecting end-of-input
       ^
```
[Answer]
# Java, 5
These are very long... so I verified string equality using a Python script, **and** I generated this formatted post, so I wouldn't have to manually insert tabs on 400 lines.
### [Initial Program](http://repl.it/qR0)
```
class Main {
  public static void main(String[] args) {
    System.out.println("hello world");
  }}
}
```
### 1
```
Main.java:5: error: class, interface, or enum expected
}
^
1 error
exit status 1
```
### 2
```
Main.java:1: error: class, interface, or enum expected
Main.java:5: error: class, interface, or enum expected
^
Main.java:1: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                         ^
Main.java:1: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                                    ^
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:5: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:1: error: = expected
Main.java:5: error: class, interface, or enum expected
                                              ^
Main.java:3: error: illegal start of type
^
^
Main.java:3: error: ';' expected
^
 ^
Main.java:6: error: ';' expected
exit status 1
    ^
Main.java:6: error: <identifier> expected
exit status 1
           ^
Main.java:6: error: reached end of file while parsing
exit status 1
             ^
10 errors
exit status 1
```
### 3
```
Main.java:1: error: class, interface, or enum expected
Main.java:1: error: class, interface, or enum expected
^
Main.java:1: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                         ^
Main.java:1: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                                    ^
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:1: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:1: error: = expected
Main.java:1: error: class, interface, or enum expected
                                              ^
Main.java:2: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
         ^
Main.java:2: error: ';' expected
Main.java:5: error: class, interface, or enum expected
          ^
Main.java:2: error: illegal start of type
Main.java:5: error: class, interface, or enum expected
           ^
Main.java:2: error: = expected
Main.java:5: error: class, interface, or enum expected
                  ^
Main.java:2: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                         ^
Main.java:2: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                                    ^
Main.java:2: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:5: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:2: error: = expected
Main.java:5: error: class, interface, or enum expected
                                              ^
Main.java:3: error: illegal start of type
^
^
Main.java:4: error: = expected
Main.java:1: error: <identifier> expected
    ^
Main.java:4: error: <identifier> expected
Main.java:1: error: <identifier> expected
         ^
Main.java:4: error: ';' expected
Main.java:1: error: <identifier> expected
          ^
Main.java:4: error: illegal start of type
Main.java:1: error: <identifier> expected
           ^
Main.java:4: error: = expected
Main.java:1: error: <identifier> expected
                  ^
Main.java:5: error: '(' expected
Main.java:5: error: class, interface, or enum expected
    ^
Main.java:5: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
         ^
Main.java:5: error: ';' expected
Main.java:5: error: class, interface, or enum expected
          ^
Main.java:5: error: illegal start of type
Main.java:5: error: class, interface, or enum expected
           ^
Main.java:5: error: = expected
Main.java:5: error: class, interface, or enum expected
                  ^
Main.java:5: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                         ^
Main.java:5: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                                    ^
Main.java:5: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:5: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:5: error: = expected
Main.java:5: error: class, interface, or enum expected
                                              ^
Main.java:6: error: illegal start of type
                         ^
                         ^
Main.java:7: error: = expected
Main.java:1: error: <identifier> expected
    ^
Main.java:7: error: <identifier> expected
Main.java:1: error: <identifier> expected
         ^
Main.java:7: error: ';' expected
Main.java:1: error: <identifier> expected
          ^
Main.java:7: error: illegal start of type
Main.java:1: error: <identifier> expected
           ^
Main.java:7: error: = expected
Main.java:1: error: <identifier> expected
                  ^
Main.java:8: error: '(' expected
Main.java:5: error: class, interface, or enum expected
    ^
Main.java:8: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
         ^
Main.java:8: error: ';' expected
Main.java:5: error: class, interface, or enum expected
          ^
Main.java:8: error: illegal start of type
Main.java:5: error: class, interface, or enum expected
           ^
Main.java:8: error: = expected
Main.java:5: error: class, interface, or enum expected
                  ^
Main.java:8: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                         ^
Main.java:8: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                                    ^
Main.java:8: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:5: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:8: error: = expected
Main.java:5: error: class, interface, or enum expected
                                              ^
Main.java:9: error: illegal start of type
                                    ^
                                    ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
    ^
Main.java:10: error: <identifier> expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
         ^
Main.java:10: error: ';' expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
          ^
Main.java:10: error: illegal start of type
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
           ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                  ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                          ^
Main.java:10: error: illegal start of type
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                  ^
Main.java:10: error: <identifier> expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                   ^
Main.java:10: error: unclosed character literal
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                     ^
Main.java:10: error: ';' expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                       ^
Main.java:10: error: unclosed character literal
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                          ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                        ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                              ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                                         ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                                                    ^
Main.java:11: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
         ^
Main.java:11: error: ';' expected
Main.java:5: error: class, interface, or enum expected
          ^
Main.java:11: error: illegal start of type
Main.java:5: error: class, interface, or enum expected
           ^
Main.java:11: error: = expected
Main.java:5: error: class, interface, or enum expected
                  ^
Main.java:11: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                         ^
Main.java:11: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                                    ^
Main.java:11: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:5: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:11: error: = expected
Main.java:5: error: class, interface, or enum expected
                                              ^
Main.java:12: error: illegal start of type
                                         ^
                                         ^
Main.java:12: error: <identifier> expected
                                         ^
                                          ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
   ^
Main.java:13: error: ';' expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
      ^
Main.java:13: error: <identifier> expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
              ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
               ^
Main.java:13: error: ';' expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
                  ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
                               ^
Main.java:13: error: unclosed character literal
  (use -source 1.4 or lower to use 'enum' as an identifier)
                                   ^
Main.java:13: error: unclosed character literal
  (use -source 1.4 or lower to use 'enum' as an identifier)
                                        ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
                                                          ^
Main.java:14: error: <identifier> expected
Main.java:1: error: = expected
         ^
Main.java:14: error: ';' expected
Main.java:1: error: = expected
          ^
Main.java:14: error: illegal start of type
Main.java:1: error: = expected
           ^
Main.java:14: error: = expected
Main.java:1: error: = expected
                  ^
Main.java:14: error: illegal start of type
Main.java:1: error: = expected
                    ^
Main.java:15: error: = expected
Main.java:5: error: class, interface, or enum expected
^
Main.java:15: error: illegal start of type
Main.java:5: error: class, interface, or enum expected
    ^
Main.java:15: error: = expected
Main.java:5: error: class, interface, or enum expected
         ^
Main.java:15: error: illegal start of type
Main.java:5: error: class, interface, or enum expected
          ^
Main.java:15: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
           ^
Main.java:15: error: = expected
Main.java:5: error: class, interface, or enum expected
             ^
Main.java:15: error: ';' expected
Main.java:5: error: class, interface, or enum expected
                  ^
Main.java:15: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                         ^
Main.java:15: error: <identifier> expected
Main.java:5: error: class, interface, or enum expected
                                    ^
Main.java:15: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:5: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:15: error: = expected
Main.java:5: error: class, interface, or enum expected
                                              ^
Main.java:16: error: illegal start of type
                                              ^
                                              ^
Main.java:17: error: = expected
Main.java:3: error: illegal start of type
    ^
Main.java:17: error: <identifier> expected
Main.java:3: error: illegal start of type
         ^
Main.java:17: error: ';' expected
Main.java:3: error: illegal start of type
          ^
Main.java:17: error: illegal start of type
Main.java:3: error: illegal start of type
           ^
Main.java:17: error: = expected
Main.java:3: error: illegal start of type
                  ^
100 errors
exit status 1
```
### 4
```
Main.java:1: error: class, interface, or enum expected
Main.java:1: error: class, interface, or enum expected
^
Main.java:1: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                         ^
Main.java:1: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                                    ^
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:1: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:1: error: = expected
Main.java:1: error: class, interface, or enum expected
                                              ^
Main.java:2: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
         ^
Main.java:2: error: ';' expected
Main.java:1: error: class, interface, or enum expected
          ^
Main.java:2: error: illegal start of type
Main.java:1: error: class, interface, or enum expected
           ^
Main.java:2: error: = expected
Main.java:1: error: class, interface, or enum expected
                  ^
Main.java:2: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                         ^
Main.java:2: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                                    ^
Main.java:2: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:1: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:2: error: = expected
Main.java:1: error: class, interface, or enum expected
                                              ^
Main.java:3: error: illegal start of type
^
^
Main.java:4: error: = expected
Main.java:1: error: <identifier> expected
    ^
Main.java:4: error: <identifier> expected
Main.java:1: error: <identifier> expected
         ^
Main.java:4: error: ';' expected
Main.java:1: error: <identifier> expected
          ^
Main.java:4: error: illegal start of type
Main.java:1: error: <identifier> expected
           ^
Main.java:4: error: = expected
Main.java:1: error: <identifier> expected
                  ^
Main.java:5: error: '(' expected
Main.java:1: error: class, interface, or enum expected
    ^
Main.java:5: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
         ^
Main.java:5: error: ';' expected
Main.java:1: error: class, interface, or enum expected
          ^
Main.java:5: error: illegal start of type
Main.java:1: error: class, interface, or enum expected
           ^
Main.java:5: error: = expected
Main.java:1: error: class, interface, or enum expected
                  ^
Main.java:5: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                         ^
Main.java:5: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                                    ^
Main.java:5: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:1: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:5: error: = expected
Main.java:1: error: class, interface, or enum expected
                                              ^
Main.java:6: error: illegal start of type
                         ^
                         ^
Main.java:7: error: = expected
Main.java:1: error: <identifier> expected
    ^
Main.java:7: error: <identifier> expected
Main.java:1: error: <identifier> expected
         ^
Main.java:7: error: ';' expected
Main.java:1: error: <identifier> expected
          ^
Main.java:7: error: illegal start of type
Main.java:1: error: <identifier> expected
           ^
Main.java:7: error: = expected
Main.java:1: error: <identifier> expected
                  ^
Main.java:8: error: '(' expected
Main.java:1: error: class, interface, or enum expected
    ^
Main.java:8: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
         ^
Main.java:8: error: ';' expected
Main.java:1: error: class, interface, or enum expected
          ^
Main.java:8: error: illegal start of type
Main.java:1: error: class, interface, or enum expected
           ^
Main.java:8: error: = expected
Main.java:1: error: class, interface, or enum expected
                  ^
Main.java:8: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                         ^
Main.java:8: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                                    ^
Main.java:8: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:1: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:8: error: = expected
Main.java:1: error: class, interface, or enum expected
                                              ^
Main.java:9: error: illegal start of type
                                    ^
                                    ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
    ^
Main.java:10: error: <identifier> expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
         ^
Main.java:10: error: ';' expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
          ^
Main.java:10: error: illegal start of type
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
           ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                  ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                          ^
Main.java:10: error: illegal start of type
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                  ^
Main.java:10: error: <identifier> expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                   ^
Main.java:10: error: unclosed character literal
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                     ^
Main.java:10: error: ';' expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                       ^
Main.java:10: error: unclosed character literal
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                          ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                        ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                              ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                                         ^
Main.java:10: error: = expected
Main.java:1: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
                                                                                    ^
Main.java:11: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
         ^
Main.java:11: error: ';' expected
Main.java:1: error: class, interface, or enum expected
          ^
Main.java:11: error: illegal start of type
Main.java:1: error: class, interface, or enum expected
           ^
Main.java:11: error: = expected
Main.java:1: error: class, interface, or enum expected
                  ^
Main.java:11: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                         ^
Main.java:11: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                                    ^
Main.java:11: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:1: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:11: error: = expected
Main.java:1: error: class, interface, or enum expected
                                              ^
Main.java:12: error: illegal start of type
                                         ^
                                         ^
Main.java:12: error: <identifier> expected
                                         ^
                                          ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
   ^
Main.java:13: error: ';' expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
      ^
Main.java:13: error: <identifier> expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
              ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
               ^
Main.java:13: error: ';' expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
                  ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
                               ^
Main.java:13: error: unclosed character literal
  (use -source 1.4 or lower to use 'enum' as an identifier)
                                   ^
Main.java:13: error: unclosed character literal
  (use -source 1.4 or lower to use 'enum' as an identifier)
                                        ^
Main.java:13: error: = expected
  (use -source 1.4 or lower to use 'enum' as an identifier)
                                                          ^
Main.java:14: error: <identifier> expected
Main.java:1: error: = expected
         ^
Main.java:14: error: ';' expected
Main.java:1: error: = expected
          ^
Main.java:14: error: illegal start of type
Main.java:1: error: = expected
           ^
Main.java:14: error: = expected
Main.java:1: error: = expected
                  ^
Main.java:14: error: illegal start of type
Main.java:1: error: = expected
                    ^
Main.java:15: error: = expected
Main.java:1: error: class, interface, or enum expected
^
Main.java:15: error: illegal start of type
Main.java:1: error: class, interface, or enum expected
    ^
Main.java:15: error: = expected
Main.java:1: error: class, interface, or enum expected
         ^
Main.java:15: error: illegal start of type
Main.java:1: error: class, interface, or enum expected
          ^
Main.java:15: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
           ^
Main.java:15: error: = expected
Main.java:1: error: class, interface, or enum expected
             ^
Main.java:15: error: ';' expected
Main.java:1: error: class, interface, or enum expected
                  ^
Main.java:15: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                         ^
Main.java:15: error: <identifier> expected
Main.java:1: error: class, interface, or enum expected
                                    ^
Main.java:15: error: as of release 5, 'enum' is a keyword, and may not be used as an identifier
Main.java:1: error: class, interface, or enum expected
                                         ^
  (use -source 1.4 or lower to use 'enum' as an identifier)
Main.java:15: error: = expected
Main.java:1: error: class, interface, or enum expected
                                              ^
Main.java:16: error: illegal start of type
                                              ^
                                              ^
Main.java:17: error: = expected
Main.java:2: error: <identifier> expected
    ^
Main.java:17: error: <identifier> expected
Main.java:2: error: <identifier> expected
         ^
Main.java:17: error: ';' expected
Main.java:2: error: <identifier> expected
          ^
Main.java:17: error: illegal start of type
Main.java:2: error: <identifier> expected
           ^
Main.java:17: error: = expected
Main.java:2: error: <identifier> expected
                  ^
100 errors
exit status 1
```
### 5 (Quine) - Omitted because of post length.
**Edit:** While the initial post used repl.it for an online interpreter, you may now use <https://ato.pxeger.com/> to avoid needing to create an account. The output will be different along the way, but it still reaches quine state in 5.
[Answer]
# Javascript, 3 error levels
This isn't that 'cleaver' or anything, but I found it rather weird...
**Error 0 (original):**
```
document.appendChild(HTMLAllCollection)
```
**Error 1:**
```
HierarchyRequestError
```
**Error 2:**
```
'HierarchyRequestError' is not defined
```
**Error 3 (quine):**
```
Excepted character ';'
```
This was all returned on Internet Explorer 11.0.9600.17416, being the errors translated to English.
---
**Printscreen:**
![Printscreen showing the console output](https://i.stack.imgur.com/Yl1MD.png)
\* The error messages are shown in Portuguese and can be easily translated to English
[Answer]
## [Vyxal](https://github.com/Vyxal/Vyxal) 3
Initial program
```
g
```
Error 1
```
Traceback (most recent call last):
  File "/home/Vyxal/mysite/vyxal/main.py", line 195, in execute_vyxal
    exec(code, locals() | globals())
  File "<string>", line 1, in <module>
  File "/home/Vyxal/mysite/vyxal/elements.py", line 3262, in monadic_minimum
    if len(lhs) == 0:
TypeError: object of type 'Zero' has no len()
```
Error 2
```
Traceback (most recent call last):
  File "/home/Vyxal/mysite/vyxal/main.py", line 195, in execute_vyxal
    exec(code, locals() | globals())
  File "<string>", line 141
SyntaxError: 'continue' not properly in loop
```
Error 3
```
Traceback (most recent call last):
  File "/home/Vyxal/mysite/vyxal/main.py", line 195, in execute_vyxal
    exec(code, locals() | globals())
  File "<string>", line 144
SyntaxError: 'continue' not properly in loop
```
For some reason the debug error message for the first 2 errors doesn't start with a newline, so the error is in line 141, which becomes line 144 after the newline is added, which stabilizes.
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 4
```
f:{
```
Error 1:
```
'parse
 f:{
    ^
```
Error 2:
```
'parse
     ^
      ^
```
Error 3:
```
'value
 'parse
  ^
```
Error 4:
```
'value
 'value
  ^
```
Which for some reason repeats itself.
`{` also works with the same amount of attempts needed.
[Answer]
## JavaScript (Google Chrome): 6 levels
Interesting how no one realized that `eval` would work! I started out with this strange script: `throw "=eval('throw 1')"`
The trick was to set the variable `Uncaught` (which is allowed), which is done to let it evaluate the rest of the code, throwing an error that will cause more errors. Finally, we predefine `eval` to shave off a few bytes for tiebreaking, and we make it even deeper. (This *can* be deeper, but this cost me too much of my insanity already!)
So, here's the resulting code and errors:
```
e=eval;throw `=e('throw "=e(\\\\"throw \`=e(\\'throw 1\\')\`\\\\")"')`
Uncaught =e('throw "=e(\\"throw `=e(\'throw 1\')`\\")"')
Uncaught =e("throw `=e('throw 1')`")
Uncaught =e('throw 1')
Uncaught 1
Uncaught SyntaxError: Unexpected number
Uncaught SyntaxError: Unexpected identifier 'SyntaxError'
```
Also, you can probably think of something simpler if the `Uncaught` part of the error message doesn't count (first line is code, rest is errors):
```
throw `throw "throw 'throw \\"throw \\\\'throw x\\\\'\\"'"`
throw "throw 'throw \"throw \\'throw x\\'\"'"
throw 'throw "throw \'throw x\'"'
throw "throw 'throw x'"
throw 'throw x'
throw x
ReferenceError: x is not defined
SyntaxError: Unexpected identifier 'ReferenceError'
SyntaxError: Unexpected identifier 'identifier'
```
Notice how `x` and `1` give the same amount of errors. I'm getting tired of the word `throw` now, so I guess I'll leave it to you to comment if you want to get this up to around 1024 bytes.
[Answer]
# [Go](https://go.dev), 4 errors
## Level 1
```
package main
func main() {
println(a)
}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70oPX_BgqWlJWm6FjfVCxKTsxPTUxVyEzPzuNJK85LBLA1NhWqugqLMvJKcPI1ETa5aiHKoLphuAA)
## Level 2
```
# command-line-arguments
../code.go:3:9: undefined: a
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70oPX_BgqWlJWm6FjdNlRWS83NzE_NSdHMy81J1E4vSS3NT80qKufT09JPzU1L10vOtjK0srRRK81JS04BKUqwUEiGaoWbAzAIA)
## Level 3
```
../code.go:1:1: illegal character U+0023 '#'
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70oPX_BgqWlJWm6Fjd19PT0k_NTUvXS860MgVAhMycnNT0xRyE5I7EoMbkktUghVNvAwMhYQV1ZHaIHqhVmBAA)
## Level 4 (loop)
```
../code.go:1:1: expected 'package', found '.'
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70oPX_BgqWlJWm6Fjd19fT0k_NTUvXS860MgVAhtaIgNbkkNUVBvSAxOTsxPVVdRyEtvzQPKKCnDtEE1QszAwA)
Every Go program with a compile-time error will have a score of 4, because of the first error (level 2) starting with `#`, which is an illegal character in Go code outside of strings. Then, Go will complain about not finding the `package` keyword at the start of the file, which is required for all Go source files.
[Answer]
## JS in Firefox 66.0; 3 error levels
Input: `6?4;`
Error #1 = Input #2: `missing : in conditional expression`
Error #2 = Input #3: `expected expression, got keyword 'in'`
Error #3 = Input #4 = Error #4: `unexpected token: identifier`
This is the highest I got.
]