Re:Whence '\N'?
by fluoridation on Monday October 07, 2024 @08:09AM
(#41765193)
The logic can be implemented entirely in a parser written in a high level language. For example,
After that you just dump the value to the output verbatim. Any high level language can handle this, it's just a change of representation like any other. There's no need to do any further delegation.
[ Parent
| on HN ]
Re:Whence '\N'?
by fluoridation on Monday October 07, 2024 @10:33AM
(#41766411)
Replying to myself because I can't edit the comment anymore. I think I see what you mean now. The parser for the language that compiles your parser also needs to know that "10" means 10, and that "0x30" means 48. I guess that also is knowledge that is passed down through compiler generations. I wonder if you could write a simple parser that doesn't contain a single numerical constant.