TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Fexl meta-parsing and symbol resolution radically simplified.

1 pointsby fexlabout 13 years ago

1 comment

fexlabout 13 years ago
Instead of the complex chaining mechanism I used before, the Fexl meta-parser is now like this:<p>Parse the source text, returning (pair ok; pair exp; symbols).<p>ok is true if the source is well-formed, i.e. no syntax errors.<p>If ok is true, exp is the parsed expression. If ok is false, exp is the string error message.<p>symbols is the list of all symbols used but not defined within the source text. It is a list of entries (pair sym line_no), where line_no is the line number on which the symbol first occurred.<p>If ok is true, then the caller can take the exp and successively apply the definitions of each symbol in the symbols list. The result will be the actual executable function which can then be run with "eval" in the Fexl intepreter.