issues
search
antlr
/
antlr4-lab
A client/server for trying out and learning about ANTLR
MIT License
39
stars
11
forks
source link
Path to examples is hardwired in JS code; code not robust in case of error
#74
Open
kaby76
opened
1 year ago
kaby76
commented
1 year ago
The JS browser code hardwires the path to the examples directory:
https://github.com/antlr/antlr4-lab/blob/711ef7d86fd5484d37eeceaf6328dfc936ab3b49/static/js/grammars-v4.js#L38
https://github.com/antlr/antlr4-lab/blob/711ef7d86fd5484d37eeceaf6328dfc936ab3b49/static/js/grammars-v4.js#L88
The client code tries to download the example input file. If there is a problem retrieving the example, the rest of the UI set-up fails, including setting up the start symbol, which occurs just after doing the download.
https://github.com/antlr/antlr4-lab/blob/711ef7d86fd5484d37eeceaf6328dfc936ab3b49/static/js/grammars-v4.js#L42