-
Notifications
You must be signed in to change notification settings - Fork 172
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
Parsing tradingview's pinescript #192
Comments
Is there any progress on this topic ? |
+1 |
Yes. Any progress? |
i have a semi-solution... |
don't know if tthis will work, but maybe it's a step towards what you need? didn't clean out th |xxx| stuff, if you sort those tokens out, please share back if you get it working..
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to try and parse a subset of tradingview's pinescript and create equivalent javascript code. I found antlr 3 lexer and parser definitions here: lexer parser.
These indicate 'ANTLR v3 syntax' so I combined these into a file called Tvscript.g file (below) and and ran
But I get a series of errors similar to below. I also tried with antlr-3.5.2-complete.jar but get different errors also shown below.
Can anyone help me understand what I am doing wrong. I've tried many things including putting the parser and lexer in different files and using
parser grammar TvscriptParser
andlexer grammar TvscriptLexer
on the first lines. Also I've tried using various different versions of antlr from https://github.com/antlr/website-antlr3/tree/gh-pages/download. 3.4 and 3.5.2 seem to give the best results with this grammar as they seem to be the only versions to accept the -> operator.antlr-3.4 errors
antlr-3.5.2 errors
The text was updated successfully, but these errors were encountered: