TI in Nemerle
IDE Cursor Position "Gate Point"
Regarding error handling, it occurred we likely have a gate point at which extra node “doctoring” will need to take place in the case of malformed source when invoking TI for completion in an IDE; namely, the cursor location at the time of inference. This may be a big help to the error recovery algorithm?
DDP: Demand-Driven Analysis with Goal Pruning
Lex Spoon has some rockin’ ideas ! I know I will very likely take many pages from this approach, just documenting it here for posterity ; )
Error Handling in Parsing
Ones I have looked through briefly:
Burke-Fisher: A Practical Method for LR and LL Syntactic Error Diagnosis and Recovery
Great ideas, solid grounding for graceful handling of error diag.
LR(k) Error Diagnosis and Recovery from Jikes
Updates on Burke-Fisher, focuses on LR(k), provides a more performant algorithm.
Ones I have looked through not so much:
ANTLR error handling and recovery
ANTLR 3.0 Error Handling TJP notes
Fast, Error Correcting Parser Combinators: A Short Tutorial
Lex, Yacc, error symbols, tutorial style: Introduction to Compiler Construction With Unix
JavaCC – Syntax Error Repair for a Javabased Parser Generator
Ruby Grammarians thread
A bit of inquiry over at ruby-grammarians yielded some great leads.
Agenda
- Work via static analysis
- Accept invalid/partial source
- Provide an open interface (observer to IDE source changes, etc., but not be impossible to hook up to a command line interface for other static analysis uses)
- Be reasonably performant (whatever that means)
It will likely be demand driven and constraints based.
It will likely be written in Java with the intent of integrating to RDT (see Summer of Code work), with experiments in Ruby.
This (hacking algorithms in both Ruby and Java) may be made easier by using an ANTLR grammar now that ANTLR3 can target Ruby as well as Java. The Rubyfront/XRuby grammar is a great candidate.
Alternatively, parse.y is viable through Jay and/or Racc.