4 ms·
> When AST is built, it is validated to make sure it makes sense (that’s called lexing) and converted it to the bytecode. I've never heard "lexing" used this w
by agalunar 5y ago
> When AST is built, it is validated to make sure it makes sense (that’s called lexing) and converted it to the bytecode.
I've never heard "lexing" used this way, and I believe it's simply incorrect. Lexing (tokenizing) precedes parsing (parse tree and then syntax tree construction). It isn't syntax tree validation.
Or so I thought. Are there other examples (besides this article) of "lexing" also being used to mean something else?
- dmitrytsepelev 5y agoThank you for catching that! Not sure where my eyes were, feels like it's a remnant of another version of the sentence. Removed
- agalunar 5y agoNo problem! Same thing happens to me, where my eyes begin to gloss over things I've written (because I know what I mean to say). Thanks for the submission!
- carapace 5y agoBTW, a good technique for catching those kinds of mistakes is to read the piece out loud. Engaging more of your nervous system makes the visual elision easier to detect.
- Existenceblinks 5y agoI think, it's called "elaboration" (In Standard ML) .. into elaborative semantics (AST that makes sense for evaluation phrase).
- nine_k 5y ago> validated to make sure it makes sense Indeed, I always thought that it's called "syntax checking" :)