Reason behind: I have written a lexer using Flex/Lex (ancient unix tool for language parsing). This lexer works on web contents, so to say the text body of a web page.
At the moment the program works as a CGI C program fetching (http-fetch) the page and processing it. This doesn’t work on pages that are dynamically generated out of CMS systems or databases. Anyway, the idea is to translate it into JS and having JS process the Document contents in the page.
For this purpose I thought Emscripten being a suitable approach.
Some questions I hope to get answered here beforehand:
Is it bound to Microsoft Windows 10 (Visual Studio)? Or can it be built on macOS also?
Thanks for answers in advance.
Yes, it is ancient in the manner that C is ancient.
That is unclear. Is it all the contents? Or is it specific areas and/or types of content? If it is all the contents then I assume it is parsing the language. That is typically called Natural Language Processing. If not that then it is not clear what the input is but perhaps it is not relevant.
@SamuelCalifornia: Your questions are justified. I don’t recall today exactly what the limitations were when I put the project aside last time I worked on it. But the essence was to better put the lex program in the script portion and have it executed on the DOM. I assume there is something like the pure text that is in a page in DOM.
Narrow it down to something like translating the contents of a page from one language into another.
And to further boil down the problem and that’s why I think EMSCRIPTEN could be a way: take the C-program (https://github.com/westes/flex) and translate it into JS.