JavaScript target is broken in the latest (v3.5) release
- Dominant language
- Java
- Stars
- 253
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
If you try to compile any grammar for tests directory, say `t001lexer.g`
```
lexer grammar t001lexer;
options {
language = JavaScript;
}
ZERO: '0';
```
you'll get a bunch of errors including:
```
error(24): template error: JavaScript.stg 27:6: required parameters (filterMode) must appear before optional parameters
```
Which is expected because of
```
lexer(grammar, name, tokens, scopes, rules, numRules, labelType="Token",
filterMode, superClass="org.antlr.runtime.Lexer") ::= <<
```
in `JavaScript.stg`
Reproducible in linux and windows using `OpenJDK v 1.6.0_20` and `JRE 1.7.0_21` correspondingly
The actual result: nothing is generated
The expected result: the `.js` and `.tokens` files to be generated
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with tests/t001lexer.g and inspect JavaScript.stg, especially the lexer template around line 27. Run the grammar compilation and confirm that the fix produces both the .js and .tokens files without template errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100