-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript Support #420
Comments
Hi @F35H , thanks for the heads up. There is an idea to add syntax files (user-supplied configs) that will make it easier to use re2c with different language backends. This is not implemented yet, but I'm slowly rewriting codegen subsystem to make it possible. |
There is no need for a string to be a byte stream. The details can be encapsulated behind generic API and you can provide suitable definitions for |
I got it to work appropriately [and viably]. The main thing that makes it difficult for javascript [beyond things such as types, pointers, etc. ] is that continue statements Other than that, it's just a matter of replacing variables where appropriate and organizing "blocks" into functions. Cntrl-H is absolutely your friend [although, now that I've tried it, free-form style with YYPEEK, YYSKIP, etc. is also clearly your friend]. |
Experimental JS support was added on |
I plan on using this for use with Javascript. The syntax is so similar it's worth using the same tool.
With --loop-switch it's almost perfect* - the string obviously can't be a pointer though.The other settings can be used easily as well replacing goto with a break or continue.
I might as well leave an issue here for the future.
*Many times I speak mid-idea. Likely the most efficient for anything is bit-vectors, but this will always be contextual and dependent on context.
**Hilarious, but because of the way continue statements work in javascript, --loop-switch is probably the only one viable right now without copious amounts of work in comparison.
The text was updated successfully, but these errors were encountered: