Skip to content

Conversation

@fabiomadge
Copy link
Collaborator

Summary

This PR documents a comprehensive investigation into adding leading dot literal support ( instead of ) to Dafny's grammar.

Investigation Results

  • Explored 26+ different implementation approaches across token-level, parser-level, and advanced parsing techniques
  • Identified fundamental conflict between leading dot literals and tuple member access ()
  • Determined that LL(1) grammar limitations prevent clean implementation without breaking existing functionality
  • Made principled decision to maintain current grammar for consistency and reliability

Documentation Added

    • Comprehensive analysis including:
  • All approaches attempted
  • Root cause analysis of conflicts
  • Technical limitations identified
  • Decision rationale
  • Lessons learned for future grammar work

Value

This documentation:

  • Prevents future duplicate work on the same investigation
  • Provides technical insights into Dafny's grammar limitations
  • Documents decision-making process for language design choices
  • Serves as reference for similar grammar enhancement requests

No Code Changes

This PR contains only documentation - no grammar or code changes were made, preserving all existing functionality.

- Investigated 26+ approaches for adding leading dot support (.5 instead of 0.5)
- Identified fundamental conflict with tuple member access (tuple.5)
- Explored token-level, parser-level, and advanced parsing techniques
- Determined that LL(1) grammar limitations prevent clean implementation
- Documented decision to maintain current grammar for consistency and reliability
- Added comprehensive analysis for future reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant