Re:The naked truth about writing a programming language (2014)
by neutronicus on Saturday May 02, 2020 @06:03PM
(#23055279)
Emacs definitely does parsing of C/C++ (or delegates to an LSP server, depending) in order to do indentation, users' preferences for which tend to depend heavily on syntactic context.
[ Parent
| on HN ]
Re:The naked truth about writing a programming language (2014)
by tom_mellior on Sunday May 03, 2020 @07:58AM
(#23058486)
Indentation is a good point, you need a proper parse for that. But for that you don't need the ability to consult symbol tables, or resolve nasty C++ template metaprogramming stuff. A context-free grammar suffices, and C++ has that. C++ also has some very complicated (undecidable) rules for what programs are well-formed and should be accepted by the compiler, but the editor's indentation tool doesn't need to worry about those.