Agda-style Lexing

Đang mở
#203 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
haskell
Lĩnh vực
compilers

Hướng nghiên cứu

Bắt đầu bằng việc đọc Agda's src/full/Agda/Syntax/Parser/Lexer.x và cuộc thảo luận được liên kết trong issue để so sánh cách tiếp cận lexing của nó với Alex. Xem lại issue #197 và các quy tắc ngữ cảnh lexing left-right được tham chiếu. Issue không xác định thay đổi cụ thể hay tiêu chí chấp nhận nào; trước tiên cần đạt được sự thống nhất về việc Alex có nên hỗ trợ hoặc áp dụng kiểu này hay không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

discussion

I have been mulling this for a while, but the difficulties in fixing #197 made it feel more urgent.

As a (rare) user of Adga, I have been very fond of it's lexing, which seems very simple, and more concerned with the boundaries between tokens rather than the contents of tokens themselves. (You can seem me singing its praises in, e.g. https://github.com/ghc-proposals/ghc-proposals/discussions/444#discussioncomment-1509256).

I have a few questions on this.

  1. Do the people implementing Agda agree with this premise, that lexing in Agda is significantly different and/or simpler than that in other languages? Or am I reading to much into it as a user guessing how it works?

  2. If the premise is valid (per question 1), is there anything Alex might do to make this easier / a more obvious way to do things? I suppose I should study https://github.com/agda/agda/blob/master/src/full/Agda/Syntax/Parser/Lexer.x

  3. Should we transition Alex itself to lex more in this style, basically requiring more things to be space-separated?

CC @andreasabel who conveniently works on both Alex and Agda, and @int-index who spearheaded the similar left right lexing context rules for Haskell.

Ngôn ngữ chính
Haskell
Star
323
Fork
87
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của haskell/alex

Tất cả issue của haskell/alex

Issue tương tự

Thêm issue về Haskell

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.