Skip to content
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

Fix build issues on Mac and Linux #252

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions benchmark/TestPerformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ import { TokenStream } from '../src/TokenStream';

import * as Utils from '../src/misc/Utils';

import { JavaLexer as JavaLexer } from './gen/std/JavaLexer';
import { JavaLexer as JavaLexerAtn } from './gen/std-atn/JavaLexer';
import { JavaLRLexer as JavaLRLexer } from './gen/lr/JavaLRLexer';
import { JavaLRLexer as JavaLRLexerAtn } from './gen/lr-atn/JavaLRLexer';

import { JavaParser as JavaParser } from './gen/std/JavaParser';
import { JavaParser as JavaParserAtn } from './gen/std-atn/JavaParser';
import { JavaLRParser as JavaLRParser } from './gen/lr/JavaLRParser';
import { JavaLRParser as JavaLRParserAtn } from './gen/lr-atn/JavaLRParser';
import { JavaLexer as JavaLexer } from './gen/std/benchmark/JavaLexer';
import { JavaLexer as JavaLexerAtn } from './gen/std-atn/benchmark/JavaLexer';
import { JavaLRLexer as JavaLRLexer } from './gen/lr/benchmark/JavaLRLexer';
import { JavaLRLexer as JavaLRLexerAtn } from './gen/lr-atn/benchmark/JavaLRLexer';

import { JavaParser as JavaParser } from './gen/std/benchmark/JavaParser';
import { JavaParser as JavaParserAtn } from './gen/std-atn/benchmark/JavaParser';
import { JavaLRParser as JavaLRParser } from './gen/lr/benchmark/JavaLRParser';
import { JavaLRParser as JavaLRParserAtn } from './gen/lr-atn/benchmark/JavaLRParser';

import * as assert from "assert";
import * as fs from 'fs';
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"unlinktool": "cd tool && npm unlink",
"clean": "npm run unlink && git clean -idx",
"antlr4ts": "npm run antlr4ts-test-xpath && npm run antlr4ts-test-rewriter && npm run antlr4ts-benchmark",
"antlr4ts-test-xpath": "antlr4ts src/tree/xpath/XPathLexer.g4 -DbaseImportPath=../.. -o src/tree/xpath",
"antlr4ts-test-rewriter": "antlr4ts test/tool/RewriterLexer1.g4 test/tool/RewriterLexer2.g4 test/tool/RewriterLexer3.g4 -DbaseImportPath=../../../../src -o test/tool/gen/rewriter",
"antlr4ts-test-xpath": "antlr4ts src/tree/xpath/XPathLexer.g4 -DbaseImportPath=../..",
"antlr4ts-test-rewriter": "antlr4ts test/tool/RewriterLexer1.g4 test/tool/RewriterLexer2.g4 test/tool/RewriterLexer3.g4 -DbaseImportPath=../../src",
"antlr4ts-benchmark": "npm run antlr4ts-benchmark-std && npm run antlr4ts-benchmark-std-atn && npm run antlr4ts-benchmark-lr && npm run antlr4ts-benchmark-lr-atn",
"antlr4ts-benchmark-std": "antlr4ts -visitor benchmark/Java.g4 -DbaseImportPath=../../../src -o benchmark/gen/std",
"antlr4ts-benchmark-std-atn": "antlr4ts -visitor -Xforce-atn benchmark/Java.g4 -DbaseImportPath=../../../src -o benchmark/gen/std-atn",
"antlr4ts-benchmark-lr": "antlr4ts -visitor benchmark/JavaLR.g4 -DbaseImportPath=../../../src -o benchmark/gen/lr",
"antlr4ts-benchmark-lr-atn": "antlr4ts -visitor -Xforce-atn benchmark/JavaLR.g4 -DbaseImportPath=../../../src -o benchmark/gen/lr-atn",
"antlr4ts-benchmark-std": "antlr4ts -visitor benchmark/Java.g4 -DbaseImportPath=../../../../src -o benchmark/gen/std",
"antlr4ts-benchmark-std-atn": "antlr4ts -visitor -Xforce-atn benchmark/Java.g4 -DbaseImportPath=../../../../src -o benchmark/gen/std-atn",
"antlr4ts-benchmark-lr": "antlr4ts -visitor benchmark/JavaLR.g4 -DbaseImportPath=../../../../src -o benchmark/gen/lr",
"antlr4ts-benchmark-lr-atn": "antlr4ts -visitor -Xforce-atn benchmark/JavaLR.g4 -DbaseImportPath=../../../../src -o benchmark/gen/lr-atn",
"tsc": "tsc",
"buildrts": "cd test/runtime && tsc",
"test": "mocha",
Expand Down Expand Up @@ -58,7 +58,7 @@
"source-map-support": "^0.4.3",
"std-mocks": "^1.0.1",
"typedoc": "^0.5.1",
"typescript": "^2.0.3"
"typescript": "2.0.8"
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion src/Recognizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ParseInfo } from "./atn/ParseInfo";
import { ProxyErrorListener } from "./ProxyErrorListener";
import { RecognitionException } from "./RecognitionException";
import { RuleContext } from "./RuleContext";
import { SuppressWarnings, NotNull } from "./decorators";
import { SuppressWarnings, NotNull } from "./Decorators";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line prevents the module working on Linux

import { Token } from "./Token";
import { Vocabulary } from "./Vocabulary";
import { VocabularyImpl } from "./VocabularyImpl";
Expand Down
6 changes: 3 additions & 3 deletions test/tool/TestTokenStreamRewriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import { Lexer } from '../../src/Lexer';
import { LexerInterpreter } from '../../src/LexerInterpreter';
import { TokenStreamRewriter } from '../../src/TokenStreamRewriter';

import { RewriterLexer1 } from './gen/rewriter/RewriterLexer1';
import { RewriterLexer2 } from './gen/rewriter/RewriterLexer2';
import { RewriterLexer3 } from './gen/rewriter/RewriterLexer3';
import { RewriterLexer1 } from './RewriterLexer1';
import { RewriterLexer2 } from './RewriterLexer2';
import { RewriterLexer3 } from './RewriterLexer3';

import * as assert from 'assert';
import { suite, test as Test, skip as Ignore } from 'mocha-typescript';
Expand Down
Empty file modified tool/antlr4ts
100644 → 100755
Empty file.