Skip to content

ANTLR: Deciding on how far to go with this #37

Closed
@RexJaeschke

Description

@RexJaeschke

On 2020-10-03, I circulated the following paper: ANTLR and the C# Spec.docx. In that, I discussed using the ANTLR grammar notation and the non-trivial amount of work I thought it would take to get the grammar to validate using the ANTLR toolkit.

Neal has reviewed that paper and his feedback follows in a comment below, with a proposal on how we might go forward. Once we discuss (and probably agree with) his suggestion, I'll update this comment by adding the remaining questions and to keep track of our decisions on those questions .

Here are the ANTLR-related questions and their status:

Proposal # Status Description
1 Yes it should Decide whether our grammar should be complete enough to validate (3 Rex's paper). Note that validation here means "get through the ANTLR tool without error," which doesn't necessarily mean that any parser generated will be complete/correct. This is especially true for semantic predicates.
2 Resolved, PRs #208, #209 Change case of lexer rule names (5.1 Rex's paper)
3 Resolved, PR #261 Expanding lexer rule alternatives of the form <...> (3 Rex's paper)
4 Resolved, PR #225 Limited use of token names (5.3 Rex's paper)
5 In-progress Resolve Mutual Left-Recursion issue (15 Rex's paper)
6 Resolved, PR #233 How to handle the unsafe extensions
7 Resolved Marking lexer helper rules with fragment
8 Resolved Ultimately, revise 7.2, "Grammars" in lexical-structure.md to say what we do/don't do w.r.t full grammar validation

When you add a comment to this issue, please limit it to a single Proposal # and say which Proposal # that is.

Any decisions we make that require changes to the grammar notation will not only have to be made to the v5 grammar we're starting with in v6, but also possibly to the v6 (and v7) PRs in waiting.

Metadata

Metadata

Assignees

Labels

status: dependencyThis issue or PR depends on another (see comments)type: processThis issue relates to processes

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions