Lexer: Fix long identifiers

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Lexer: Fix operator names

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Parser: Spec references

Signed-off-by: Pekka Enberg <penberg@kernel.org>
AST: Const

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Fix compiler directive parsing breakage

Fix up '#help' and '#quit' parsing in REPL.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
AST: Script fragment

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Lexer: Fix whitespace skipping

Signed-off-by: Pekka Enberg <penberg@kernel.org>
AST: Import declaration

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Parser: Fix long identifiers

Long identifiers are not supposed to *require* dots:

  > open System
  line 1:5 mismatched input 'System' expecting LongIdent
  Exception in thread "main" java.lang.NullPointerException
          at fjord.ast.ScriptFragment.accept(ScriptFragment.java:15)
          at fjord.Main.eval(Main.java:33)
          at fjord.Main.main(Main.java:22)

Fix that up.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
AST: Fix NPE in ScriptFragment#accept

Signed-off-by: Pekka Enberg <penberg@kernel.org>
FAQ

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Fix FAQ formatting

Signed-off-by: Pekka Enberg <penberg@kernel.org>
AST: Kill ModuleElem interface

Subtype polymorphism doesn't really work here. For example, value
definition grammar rules are used for both module signature elements and
module elements.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Parser: Access

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Upgrade to ANTLR4

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Revert "Upgrade to ANTLR4"

This reverts commit d897f9375ff3abcec0a201b53823f97ee2848e89. It's not a
matter of simply bumping up the version number in Maven POM.
Lexer: Make VerbatimStringChar a fragment

VerbatimStringChar is not a token so turn it into a fragment.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Parser: First take types, expressions, and patterns

Most of the grammar is disabled but it is good enough for expressions
such as:

  let x = "hello"

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Parser: Remove duplicate tokens

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Parser: Types

Signed-off-by: Pekka Enberg <penberg@kernel.org>