Commit Graph

2611 Commits

Author SHA1 Message Date
Terence Parr 593b49fa3d Merge pull request #1983 from shirou/master
[Go] Add CommonTokenStream test.
2017-10-21 13:00:02 -07:00
Terence Parr 8a551095dc Merge branch 'master' into export-lexer-methods 2017-10-21 12:58:22 -07:00
Terence Parr 0839970e00 Revert "CMake build fixes for Visual Studio" 2017-10-21 12:55:16 -07:00
Terence Parr fa72e72de0 Merge pull request #2011 from gendalph/master
CMake build fixes for Visual Studio
2017-10-21 12:53:53 -07:00
Hanzhou Shi 0dce38109c Update boot.py and swift-target.md to reflect Swift 4 migration changes. 2017-10-21 12:44:44 -07:00
Terence Parr c9c7561701 Merge pull request #2032 from ewanmellor/swift-4
Migrate the Swift runtime to Swift 4.
2017-10-21 12:26:29 -07:00
Terence Parr 38aaf88097 Revert "[Go] Interval" 2017-10-21 12:00:25 -07:00
Terence Parr 24c149603d Merge pull request #1978 from neatnerd/go-target
[Go] Interval
2017-10-21 09:38:00 -07:00
Terence Parr 1985fede5d Merge pull request #2052 from ewanmellor/swift-remove-nullPointer
Remove ANTLRError.nullPointer from the Swift runtime.
2017-10-21 09:19:54 -07:00
Ewan Mellor 7aa6b544d9
Redo Package.swift for Swift Package Manager 4.0. 2017-10-20 10:12:47 -07:00
Ewan Mellor 8a292c0f4f
Migrate the Swift runtime to Swift 4.
Remove a number of generic type constraints, since these can now
be inferred by the compiler.

Match the syntax change when passing a tuple into a function (adding
an extra set of parens).

Change filterPrecedencePredicates to avoid a now-illegal cast.

Match the renames truncatingBitPattern -> truncatingIfNeeded,
multiplyWithOverflow -> multipliedReportingOverflow, etc.  In
some cases the multiplyWithOverflow calls are replaced by
overflowing operators (e.g. &*) instead.
2017-10-20 10:12:46 -07:00
Ewan Mellor 365d4f40bb
Refactor to avoid forced casts. 2017-10-20 10:12:46 -07:00
Ewan Mellor 4bafc74e6c
Remove unused functions from StringExtension.
Some of these are subject to change for Swift 4, but since they are unused
we should remove them anyway.
2017-10-20 10:12:46 -07:00
Ewan Mellor 8ba2c0ba4f
Add entries to .gitignore for the files that are generated by
Swift Package Manager.
2017-10-20 10:12:46 -07:00
Arshinskiy Mike 5297bf2697 Modified open interval logic
Added tests
2017-10-14 20:31:38 +02:00
Arshinskiy Mike d297c9ddda added initial tests for interval set 2017-10-14 15:15:41 +02:00
Terence Parr 7d2a0978b5 Merge branch 'master' into fix-unicode-2031 2017-10-12 09:38:16 -07:00
Ewan Mellor 5df3b2bbdf
Remove ANTLRError.nullPointer from the Swift runtime.
This was copied from the API of the equivalent code in Java when
the runtime was ported to Swift.  It is meaningless in Swift, and
was unused.
2017-10-12 00:52:44 -07:00
Terence Parr c861e09d39 Merge pull request #1977 from nielsbasjes/EmptyGetText
Fixed empty CodePointCharStream throwing exception on getText.
2017-10-10 12:47:00 -07:00
Terence Parr cb558ccb48 Merge pull request #1954 from kosak/no-attribute-on-enum-class
Remove the useless visibility attribute from this "enum class" declaration
2017-10-10 12:40:31 -07:00
Terence Parr a308cd5d8d Merge branch 'master' into ignore-cmake-policy-0054 2017-10-10 12:36:01 -07:00
Eric Vergnaud 44031b544d fix #2031 2017-09-30 17:07:40 +08:00
Ewan Mellor 99d32dc861
Add some version numbers to pom.xml.
This silences warnings from Maven.
2017-09-28 16:10:26 -07:00
Terence Parr e6d60007e7 Merge pull request #1956 from renatahodovan/syntax-errors
Python: add public getter to parsers to access syntax error count.
2017-09-17 11:20:56 -07:00
Terence Parr f86835928f Merge branch 'master' into master 2017-09-17 11:20:10 -07:00
Terence Parr 8f50bd0df6 Merge branch 'master' into master 2017-09-17 11:17:14 -07:00
Robert Jacobson 8f30ae6610 Import RuleContext into the antlr4 module namespace. See Issue #2012. 2017-09-16 16:16:01 -04:00
gendalph 50d2d3ef55 CMake build fixes for Visual Studio
Remove unsupported cmd line options (gcc).
Disable warning for DLL.
2017-09-12 22:10:59 +03:00
Eddy Reyes 168ac02b22 Export lexer method GetAllTokens 2017-08-29 19:11:36 -05:00
Eddy Reyes 2423359b28 Export Lexer methods
- They can be called in target-specific grammar actions, therefore must
  be exported.
- Their Java analogues are public methods.
2017-08-22 23:37:26 -05:00
Milan Aleksić 3beb771882 Fixed #1858: replacing implicit type with uint
This fix allows compilation and execution under ARM architecture, since default type couldn't handle all possible values
2017-08-21 13:13:37 +02:00
WAKAYAMA Shirou 06f2dfebdf [Go] remove assert lib and re-implement in this package. 2017-08-08 11:03:37 +09:00
WAKAYAMA Shirou bfd7a20e99 [Go] Add CommonTokenStream test.
This test is run by `go test`.
and also add test and testing utils.

Note: `github.com/stretchr/testify/assert` is required.
This assert library is almost same functionality for Java assert.
2017-08-07 20:31:55 +09:00
Jan Martin Mikkelsen 5fd7a6eadb Merge branch 'master' of https://github.com/jm-mikkelsen/antlr4 2017-08-05 15:39:01 +10:00
Jan Martin Mikkelsen b106f8ee08 Remove byte order mark on utf8 files. 2017-08-05 15:38:11 +10:00
Jan Martin Mikkelsen e70e41282c Style changes as requested 2017-08-05 13:46:24 +10:00
Jan Mikkelsen 7d36c5f6b8 Merge https://github.com/antlr/antlr4 2017-08-05 13:14:14 +10:00
Arshinskiy Mike ba75dc9550 Added additional interval math functionality 2017-08-03 01:03:28 +02:00
Niels Basjes ac9f75303e Fixed empty CodePointCharStream throwing exception on getText. Fixes #1949 2017-08-02 14:30:46 +02:00
Terence Parr 590fa8394c Merge pull request #1942 from neatnerd/master
[Go] Implemented TokenStreamRewriter
2017-08-01 15:08:35 -07:00
Terence Parr a0421807db Merge pull request #1969 from sharwell/propagate-error-sets
Report InputMismatchException with original context information
2017-08-01 13:36:10 -07:00
Hanzhou Shi 22caddc12f Autopass for doc conversion. 2017-07-29 23:28:15 -07:00
Hanzhou Shi 82b2480fe5 Tweak HTML comments. 2017-07-29 22:53:44 -07:00
Hanzhou Shi 0137218930 Removing dead code, malformed documentations, etc. 2017-07-29 17:27:33 -07:00
Arshinskiy Mike dced604c7c Corrected Start/Stop spelling 2017-07-29 22:05:46 +02:00
neatnerd c1c069cf5e Merge branch 'master' into master 2017-07-28 23:56:51 +02:00
neatnerd ca9409c7bc Remove duplicate comments 2017-07-28 23:55:40 +02:00
Matt Hauck a2fcad61f0 Differentiate windows static lib suffix to avoid being clobbered
Since the install target install static and shared libs into same
folder, and because on windows a shared lib also outputs a shared
.lib file to link against, need to make sure the static/shared
.lib files do not clobber each other.
2017-07-28 13:12:47 -07:00
Matt Hauck 11d185f744 add some missing flags; fix debug build 2017-07-27 22:08:13 -07:00
Matt Hauck b41782964b Add MSVC support to c++ cmake build 2017-07-27 21:37:09 -07:00
Matt Hauck 95338f710e Ignore Cmake policy CMP0054 2017-07-27 20:54:59 -07:00
Sam Harwell 0803c74eb2 Report InputMismatchException with original context information
Fixes #1922
2017-07-27 18:34:13 -05:00
WAKAYAMA Shirou 1b11cbed18 Merge remote-tracking branch 'upstream/master' 2017-07-27 21:52:12 +09:00
Venkat Peri e01af374d2 'requires' SUPERclass for Lexers in split mode, symbols/modes/channels available on Lexer prototype for use in lexer actions (this.SOME_MODE) like in Java actions, Utils.escapeWhiteSpace uses regex for global replace (was replacing only first occurnce of \n etc). 2017-07-22 18:11:37 -04:00
Mike Lischke 8149ff77fa Consequently use static_cast for (s)size_t casts.
Also fixed XCode tests.
2017-07-19 10:43:36 +02:00
Renata Hodovan 6e02088e6a Python: add public getter to parsers to access syntax error count.
ANTLR parsers in Java are allowed to access the number of encountered
syntax errors via the getNumberOfSyntaxErrors method. However, the
Python variants must use the protected _syntaxErrors member to get this
value. The patch defines the same getter for Python targets too.
2017-07-18 18:29:36 +02:00
Sam Harwell c8805ab584 Avoid adding to closureBusy before all ATNConfig properties are set
Setting ATNConfig properties can change the hash code of the instance, leading
to cases where the closureBusy set places objects in the wrong buckets. While
this has not led to known cases of stack overflow, it has led to cases where
one or more buckets contains a large number of duplicate objects, and the set's
add operation goes from O(1) to O(n).
2017-07-18 07:27:36 -05:00
Corey Kosak 2bce3a74d4 Remove the useless visibility attribute from this "enum class" declaration.
When compiling under gcc, ANTLR4CPP_PUBLIC macro expands to the following
gcc visibility attribute:
 __attribute__((visibility ("default")))

(when compiling under Windows it expands to the corresponding __declspec
attribute)

This change was introduced in commit 8ff852640a

Although the attribute makes perfect sense when applied to a "class"
declaration, it makes no sense (has no effect) when applied to an
"enum class" declaration. I assume that doing so was unintentional; that
when the change was introduced it was it was added mechanically to all
"class XXX" instances in the source code, a process which accidentally
picked up one "enum class XXX" instance.

Although it has no effect on the object code, it leads to the following
warning when compiling under gcc:
/usr/local/include/antlr4-runtime/atn/PredictionMode.h:18:31: error: type attributes ignored after type is already defined [-Werror=attributes]
   enum class ANTLR4CPP_PUBLIC PredictionMode {

This is a problem for people who would like their builds to be warning-free.

Happily, this declaration can be safely removed. The "enum class" construct
(just like with regular enum) does not cause any linker symbols to be
emitted. So having a linker attribute on the type does not actually have any
effect. It can therefore be safely removed.
2017-07-17 17:54:17 -04:00
vaibhavaingankar09 8b3da13259 fix to the ATN deserialiser issue on big endian architecture 2017-07-17 06:45:29 +00:00
Maurice van der Pot 162e2657b8 Fix two issues found by coverity 2017-07-15 17:20:59 +02:00
WAKAYAMA Shirou b36044108a [Go] Expose Start and Stop of Interval. 2017-07-10 09:51:07 +09:00
Arshinskiy Mike 1ce5f91573 [Go] Implemented TokenStreamRewriter
TokenStreamRewriter implementation was missing
Ported code from Java version; however, there are couple of deviations due to difference between composition (Go) and inheritance (Java) concepts
Ported tests from Swift for LexerA
2017-07-09 09:39:46 +02:00
WAKAYAMA Shirou 1054e658b2 [Go] change Interval.contains to public instead of add wrapper function. 2017-07-07 14:41:01 +09:00
WAKAYAMA Shirou 749fa81993 [Go] Add exported getter method to Interval. 2017-07-07 13:14:16 +09:00
Mike Lischke 6319d62409 Don't create VS 2013 packages anymore by default.
Can be enabled on demand.
2017-07-02 14:31:01 +02:00
Mike Lischke b7060ba1f5 Visual Studio build fixes for previous C++ patch.
VS 2013 doesn't accept certain C++11 constants like std::numeric_limits, so we have to return to the code used before that mentioned patch.
2017-07-02 14:29:54 +02:00
Mike Lischke f33fca6789 XCode build fixes for previous C++ patch. 2017-07-01 19:30:02 +02:00
Mike Lischke aa2d34bdfd Merge branch 'master' into interpreter2 2017-06-30 13:44:11 +02:00
Jan Martin Mikkelsen d4b18697f2 Fix unsafe usage on _edgeLock
Iterators on an unordered_map were being dereferenced after dropping a
read lock, leading to races where iterators could be invalidated before
they were used.
2017-06-30 10:47:43 +10:00
Jan Martin Mikkelsen d7f5e1834b Rework C++ Interval, IntervalSet, ATN and ATNState
- Remove the readonly status from IntervalSet.
- Remove virtual functions from IntervalSet and Interval. These are
  passed by value throughout the C++ runtime; meaningful inheritance is
  not possible anyway.
- Moving the atomic flag into ATNState as a "now cached" flag.
- Return a const reference from ATN::nextStates(ATNState*) so the readonly
  status is enforced by the compiler not at runtime in the code.
- Use value semantics using std::move to reduce the number of copies performed,
  constent with how these classes are used in the C++ runtime source.
- Remove type-unsafe varargs constructor in IntervalSet, replace with
  type-safe varadic templates implementation.
2017-06-27 11:04:50 +10:00
Jan Martin Mikkelsen 0c4473ea1a Merge https://github.com/antlr/antlr4 2017-06-26 17:22:44 +10:00
alimg 60cce436c2 Merge branch 'master' of https://github.com/antlr/antlr4 into py-input-mismatch-error 2017-06-25 19:02:26 +03:00
Terence Parr 645855a65a Merge pull request #1926 from ericvergnaud/fix-unicode-lexer
Fix #1925
2017-06-25 08:38:10 -07:00
Eric Vergnaud c3b742e090 also fix in go 2017-06-25 14:49:21 +08:00
Eric Vergnaud 0166ba95ac fix JavaScript too 2017-06-25 13:44:24 +08:00
Eric Vergnaud ff4ffa613b Fix ATN deserialisation for unicode chars FFFE and FFFF 2017-06-25 12:05:57 +08:00
alimg f0d1a093ed Python: fix reported input alternatives are not in par with Java version 2017-06-19 18:55:48 +03:00
Daniel Katz 952b971728 Update .Net NuGet package name to 4.7 with .NET Core target 2017-06-14 11:22:47 +03:00
Jan Martin Mikkelsen fdcfefa0a9 Convention: Change virtual dtor to empty bodies 2017-06-12 20:26:17 +10:00
Jan Martin Mikkelsen fad048897e SemanticContext::Operator: explicit virtual dtor 2017-06-12 19:44:34 +10:00
Jan Martin Mikkelsen 63fc7cb7a7 LexerActionType.h: Use antlr4-common.h for size_t 2017-06-12 19:42:04 +10:00
Jan Martin Mikkelsen aab2c043f0 Fix missed curly brace convention fix. 2017-06-12 11:26:06 +10:00
Jan Martin Mikkelsen 8c45d71673 Undo remove cast to same type in generated code 2017-06-12 11:13:42 +10:00
Jan Martin Mikkelsen 577b1d61bb Comply with curly brace conventions. 2017-06-12 11:10:32 +10:00
Jan Martin Mikkelsen 8fd4bcfa33 Add defined() before #if SYM > val evaluations
- Change "#if SYM > x" to "#if defined(SYM) && SYM > x" as a pattern. In
  StringUtils.h this follows the pattern used earlier in the file.
2017-06-12 10:46:29 +10:00
Jan Martin Mikkelsen 274e3c2d3b Change Lexer::{MORE,SKIP} def back to negative
- Explicitly cast negative values to size_t instead of using an offset
  from std::numeric_limts<size_t>::max().
2017-06-12 10:44:30 +10:00
Jan Martin Mikkelsen 6e46b168f5 Naming convention fix for qualifing shadowed args
- Change qualifying suffix from "_in" to "_" to confirm with
  conventions.
2017-06-12 10:23:47 +10:00
Jan Martin Mikkelsen dde893d365 Merge https://github.com/antlr/antlr4 2017-06-12 10:07:55 +10:00
Terence Parr e9155ef9cb Merge pull request #1908 from mike-lischke/master-build-fix
[C++] Build fix/correction for UTF32 conversion.
2017-06-11 08:54:46 -07:00
Terence Parr 35cf1ba4ff Merge pull request #1907 from mike-lischke/optimizations
[C++] Small optimizations
2017-06-11 08:54:21 -07:00
Mike Lischke ef49f61819 Formatting 2017-06-11 13:31:33 +02:00
Jan Martin Mikkelsen 70402f8eff ATN: Remove race condition in addState(ATNState*)
This is a proposed fix to bug #1826 which removes a race condition where
multiple threads could update ATNState::nextTokenWithinRule, leading to
corrupted std::vector instances in an InstanceSet.
2017-06-11 11:23:33 +10:00
Jan Martin Mikkelsen 4a359c1831 ATN: Handle empty, read-only, nextTokenWithinRule
ATN::nextTokens(ATNState* s) updates s->nextTokenWithinRule if the
IntervalSet is empty, and then sets it to be read only. However, if the
updated IntervalSet value was also empty, it becomes a read-only empty
set, causing an exception on a second call on the same state.

This was exposed a change I made to make IntervalSet::operator=()
respect the _readonly flag. (Which in turn was found by compiling with a
high warningly level.)

The approach in this update is to perform the update if the updated
value is not empty or if the current value is not read only. This
preserves the previous behaviour of creating a read-only empty set and
working on subsequent calls. It will throw on an attempt to update a
read-only value, where previously the read-only value would be silently
discarded and set to updatable.
2017-06-11 09:53:47 +10:00
Jan Martin Mikkelsen eb02a05efb Possible fix for max_align_t breakage in Travis CI
The Travis CI build is failing after an include of <cstddef> -- This is
an attempt to work around that by including <stddef.h> instead. Problem
not apparent in my FreeBSD environment.
2017-06-10 19:56:31 +10:00
Jan Martin Mikkelsen 2d011c8e3a Remove C++14 auto return type on utf8_to_utf32
- Also remove static instance of std::wstring_convert. Access to
  std::wstring_convert<>::{from,to}_bytes() is not guaranteed to be thread
  safe.
2017-06-10 18:46:46 +10:00
Jan Martin Mikkelsen 092afb283e C++ runtime changes for high warning levels
These changes are for compiling with high warning levels and -Werror.
There are no functional changes in this commit. Compiled with gcc 5.4
and clang 3.8.

Summary:

- Put virtual destructors into the appropriate .cpp file instead
  of the inline version in the header to avoid many vtables.
- Change C-style casts to modern C++ casts.
- Add explicit casts in some signed to/from unsigned conversions.
- Remove unreached code in BufferedTokenStream.cpp and
  LexerATNSimulator.cpp.
- Remove shadowed variables by qualifying constructor arguments with
  the name name as a member variable.
- Add explicitly defined copy constructors and assignment operators
  where required by gcc's -Weff-c++.
- Use std::numeric_limits<size_t>::max() instead of assigning a negative
  number.
- Remove semi-colons after function definitions.
- Remove unneccessary casts.
- In preprocessor statements "#if label > value" change to
  "#if defined(label) && label > value" to avoid warnings about the
  undefined symbol being seen as zero.
- Remove ANTLR4CPP_PUBLIC from "enum class" definitions.
- Change the FinalAction move constructor to move instead of copy the
  _cleanUp std::function object. (A side-effect of explicitly
  initialising member variables as required by gcc's -Weff-c++. I turned
  this one off because most constructors needed to be touched,
  especially the classes implemented with InitializeInstanceFields()).
- Mark hex digit conversion functions as file static in guid.cpp.
2017-06-10 17:29:25 +10:00
Jan Martin Mikkelsen 9845382e86 Implement IntervalSet::operator=() using the same semantics as the copy
constructor, put the destructor into the .cpp file so the vtable doesn't
get generated everywhere.
2017-06-10 16:47:01 +10:00
Mike Lischke cec714f745 Corrections for VS 2015. 2017-06-04 14:26:55 +02:00
Mike Lischke 19f584da05 Fixed build after UTF32 string convesion patch.
Also made converter local vars in conversion routines, instead of static global vars.
2017-06-04 12:24:06 +02:00
Mike Lischke 4fdcff6f05 Merge branch 'master-upstream' 2017-06-04 12:13:56 +02:00
Hanzhou Shi 4c0bbfd768 Marking Mutex.synchronized with rethrow. 2017-06-03 22:57:22 -07:00
Hanzhou Shi 53b83d7184 Refactored synchronization by using mutex. 2017-06-03 22:57:22 -07:00
Hanzhou Shi 13769268c9 fixing string issue. 2017-06-03 22:57:21 -07:00
Hanzhou Shi a64ec12e73 fixing tests, and some cleanups. 2017-06-03 22:57:21 -07:00
Hanzhou Shi a879297bb5 swift build & swift test support Linux platform 2017-06-03 22:57:21 -07:00
Hanzhou Shi d66f89db52 Removed xcworkspace. 2017-06-03 22:57:20 -07:00
Hanzhou Shi 67f683d0ac Adding generation of dyanmically linked lib. 2017-06-03 22:57:20 -07:00
Mike Lischke 47d639e7b7 Merge branch 'master-upstream' 2017-06-01 09:04:43 +02:00
lys0716 22034daf25 Typo in the comments of IntStream.java
An extra word is in the comments.

Signed-off-by: Yishuang Lu luyscmu@gmail.com
2017-05-31 21:17:29 -07:00
Terence Parr fd5efc250d Merge pull request #1891 from kosak/master
Make ParseTreeWalker::DEFAULT provide an IterativeParseTreeWalker
2017-05-31 10:22:19 -07:00
Terence Parr 053c594fec Merge pull request #1886 from ericvergnaud/nuget-version
Set version to 4.7.1 because 4.7.0 already exists on Nuget
2017-05-31 10:21:49 -07:00
Terence Parr 7ce775dcaa Merge pull request #1862 from hanjoes/swift-py-script
Supporting Script for Swift Runtime
2017-05-31 10:19:19 -07:00
Terence Parr 745c88a7c9 Merge pull request #1830 from mike-lischke/issue1827
Channel parameter in c-tor is now a size_t - fixes #1827.
2017-05-31 10:16:10 -07:00
Terence Parr 2c4a55c10a Merge pull request #1849 from shravanrn/master
Fix the utf8 convertor for VS2017
2017-05-31 08:01:31 -07:00
Corey Kosak 381fddebd5 Make ParseTreeWalker::DEFAULT provide an IterativeParseTreeWalker
as intended.

The existing code intended for ParseTreeWalker::DEFAULT to provide a
IterativeParseTreeWalker. However, the implementation initialized
ParseTreeWalker::DEFAULT by doing a (value) copy of an
IterativeParseTreeWalker, which sliced the object and therefore,
unfortunately, transformed it back into a regular ParseTreeWalker.

This change implements the desired behavior. Furthermore by making DEFAULT
a reference, we are able to preserve the interface to existing code.
2017-05-29 22:21:01 -04:00
Eric Vergnaud 44ab88c6f9 Set version to 4.7.1 because 4.7.0 already exists on Nuget 2017-05-28 20:47:58 +08:00
Will Fuqua e39543a257 add build script and update docs 2017-05-27 00:02:54 +07:00
Will Fuqua e88eba13fb add dotnetcore dll to nuspec
as part of this, add OutputPath to the csproj so it matches the mono csproj OutputPath
2017-05-26 23:12:47 +07:00
Shravan Narayan 9220df2e37 Merge branch 'master' into master 2017-05-15 16:58:55 -07:00
shravanrn@gmail.com de6f04be0b Fix the utf8 convertor in VS2017 2017-05-15 16:53:05 -07:00
Terence Parr f2ee752a58 Merge pull request #1848 from davesisson/master
Fix tests for PR #1844.
2017-05-12 09:18:46 -07:00
Terence Parr c1663e7c0f Merge pull request #1845 from xied75/dotnetcore
[dotnet] speed up tests; rename runtime dll ready for nuget
2017-05-12 08:00:38 -07:00
Jim Allman 892aa4a376 Fix other calls to InputStream constructor. 2017-05-11 17:08:24 -04:00
Jim Allman 5e648f0867 Add `new` keyword to return proper InputStreams
Currently the JS runtime sometimes returns (and mangles) the global
`window` object instead of a proper InputStream. This is prevented by
using the `new` keyword in all cases.
2017-05-11 16:27:42 -04:00
Hanzhou Shi 834f1ede27 Find antlr4 runtime instead of hardcoding. 2017-05-09 21:31:32 -07:00
Hanzhou Shi c53bd27734 Get rid of xcodeproj file. 2017-05-08 22:37:21 -07:00
Hanzhou Shi 55f9c06509 Now can generate xcode project. 2017-05-08 22:36:29 -07:00
Hanzhou Shi 9f41e6fd9d Adding support for generating local ANTLR Swift repo. 2017-05-08 22:28:46 -07:00
Hanzhou Shi d5f37015ab Adding more commands and comments. 2017-05-07 22:48:36 -07:00
Hanzhou Shi c13964868c Renaming test.py to boot.py and make it more general. 2017-05-07 22:37:48 -07:00
Mike Lischke 25eeb94498 Rule names are now always written to interpreter data file.
Updated loaders for Java and C++.
2017-05-05 17:00:41 +02:00
Mike Lischke a53c49ff44 Merge branch 'master-upstream' 2017-05-04 09:58:10 +02:00
David Sisson fc8b14b1dc io.Copy surprisingly returns the number of bytes it copies so we need to explicitly ignore that. 2017-04-29 18:45:45 -07:00
David Sisson 32a8874a29 Add proper error handling semantics to FileStream. 2017-04-27 21:40:44 -07:00
Dong Xie 5fffe4bb2e [dotnet] try to get test run faster; update from 1.0.1 to 1.0.3; fix test dir removal not recursive 2017-04-27 17:23:48 +01:00
Mike Lischke d12e755c02 Properly sorted exceptions in the forward declaration list.
Removed some duplicate classes there too.
2017-04-26 16:18:50 +02:00
Mike Lischke 126eec7092 2 corrections (C++ runtime and interpreter data writer)
- A wrong check for EOF has been corrected in the UnbufferedTokenStream (now using the correct data type for the cast to avoid warnings).
- The interpreter data write function no longer implicitly writes out imported grammars. Grammars are merged and hence contain everything from imported grammars already. If interpreter data for an imported grammar is required pass that grammar explicitly to the ANTLR tool.
2017-04-23 13:05:27 +02:00
Mike Lischke 3bffb070b2 Final touches on Java part. 2017-04-21 17:32:44 +02:00
Mike Lischke 8d420e3d24 A few changes that slipped through. 2017-04-21 17:23:39 +02:00
Mike Lischke 76394af71a Channel parameter in c-tor is now a size_t - fixes #1827.
A bit cleanup on the way.
2017-04-19 14:13:01 +02:00
Terence Parr 43e73c548b Merge pull request #1822 from mike-lischke/master
Small fix in cmake file. Fixes #1809.
2017-04-17 09:56:49 -07:00
Terence Parr efc0a14879 Merge pull request #1810 from xied75/dotnetcore
[dotnet] update to .netcore v1.0.1; add osx build
2017-04-17 09:55:32 -07:00
Mike Lischke d812528c89 Added new InterpreterDataReader to VS solution.
Fixed a few warnings too.
2017-04-15 16:56:00 +02:00
Mike Lischke 8995f0559f Adds a new option to allow ANTLR to generate interpreter data.
Especially when you want to use LexerInterpreter and/or ParserInterpreter in any of the non-Java targets you have to provide the ATN and other data. The classes to generate these values are not in the runtime, however. Hence we need a way to tell ANTLR to produce that in a way that can be consumed by all targets.

This patch adds a new command line parameter (-interpreter) which causes ANTLR to parse the given grammars as usual and then let it generated a file for each grammar with the required interpreter values. A new InterpreterDataReader class has been added to the Java + C++ runtimes. This class can load the data file (a plain text file) and generate the structures that can directly be fed to the interpreters.
2017-04-15 16:55:49 +02:00
Mike Lischke 1503821fa6 Small fix in cmake file. Fixes #1809. 2017-04-13 09:08:56 +02:00
Terence Parr 42e6b09d54 Merge pull request #1813 from FloorGoddijn/master
CPP target runtime: fixed a memleak
2017-04-07 09:31:40 -07:00
parrt 5616e370e4 add null check to findNodeSuchThat 2017-04-06 15:41:21 -07:00
Floor ea3d9d8fb4 fixed a memleak ( "previous' was not deleted when one of the break statements was hit) 2017-04-05 10:44:48 +02:00
Dong Xie da4987dc38 [dotnet] update to .netcore v1.0.1; add osx build 2017-04-04 15:26:40 +01:00
Hanzhou Shi 07048fe787 Fixing unit tests. 2017-04-02 09:41:55 -07:00