github-linguist/linguist

Alex and Happy

開放

#5,822 建立於 2022年3月14日

 (2 則留言) (4 個反應) (0 位負責人)Ruby (5,166 個分叉)batch import
Add LanguageGood First Issue

倉庫指標

星標
 (13,466 顆星)
PR 合併指標
 (平均合併 102天 5小時) (30 天內合併 19 個 PR)

描述

Previous discussions: #2446 #4302

Alex and Happy are lexer and parser generators (respectively) for Haskell, based on Lex and Yacc for C. They also share extensions with Lex and Yacc, and as such are misclassified as them currently:

~200 Alex files misclassified as Lex ~1250 Happy files misclassified as Yacc

Additionally, #4952 introduced an Alex file as a sample file for Lex, which is incorrect.

Below are the templates for both Alex and Happy. The reason this is an issue and not a PR is that I'm not aware of any TextMate grammars for either of them. Currently however they are using Lex and Yacc's grammars, which result in nonsense highlighting. If they can be added without having grammars I can open a PR for them.


Language name

Alex

URL of example repository

https://github.com/haskell/alex/blob/master/src/Scan.x

Most popular extensions

  • .x

Detected language

  • Lex
  • Logos

Language name

Happy

URL of example repository

https://github.com/haskell/alex/blob/master/src/Parser.y

Most popular extensions

  • .y

Detected language

  • Yacc

貢獻者指南