stadelmanma / tree-sitter-fortran

Fortran grammar for tree-sitter
MIT License
30 stars 15 forks source link

Fix a few small issues #85

Closed ZedThree closed 1 year ago

ZedThree commented 1 year ago
  1. Add the obsolescent "do label construct": do 100 i=1, 10 which doesn't use end do, quite common in ancient F77 code, and rarely in F90 (usually just copy-pasted F77 in a module) -- this is important for the fixed form parser
  2. backspace, rewind, endfile, pause: very rarely used
  3. Some edit descriptors (/, :, P and others) don't require a comma before the next descriptor. Trying to capture all the rules was tricky, so I just made the comma completely optional
  4. Add a couple more keywords to the list of conflicted identifiers
stadelmanma commented 1 year ago

Looks great. Regarding the edit descriptors, it’s ok if some of the parsing rules are a little more general than the actual compiler allows.