Zafar Khaja
9c72603fb9
Clarify why input isn't used in VersionParser.parse()
2015-06-09 13:39:44 +03:00
Zafar Khaja
eff87d8753
Update copyright years (2012-2015)
2015-03-19 19:56:32 +02:00
Zafar Khaja
97c768eab1
Rename EOL (End Of Line) to EOI (End Of Input)
2015-03-19 19:52:29 +02:00
Zafar Khaja
f3f9b81838
Refactor ExpressionParser, polish, fix issues
...
This commit refactors and polishes the ExpressionParser as well
as fixes the issue with parsing of the <partial-version-range>
non-terminal introduced in the previous commit. It also updates
the expressions examples in the README file.
2015-03-19 19:48:22 +02:00
Shay Yaakov
4b6c9edd66
Implement partial compatibility with node-semver
...
This commit enhances expressions for greater compatibility
with node-semver (https://github.com/npm/node-semver ):
- Added support for the Caret operator (^)
- Added support for the X-Ranges with additional wildcard "x"
- Fixed the Tilde ranges to be fully compatible
Known issues:
- The X-Ranges in the form of short versions are not interpreted
correctly if not followed by EOL: while version "1.2.3" does
satisfy expression "1", it doesn't satisfy expression "1 | 2".
2015-03-12 12:55:24 +02:00
Zafar Khaja
ea68756f5e
Rename ExpressionParser.versionOf() to versionFor()
2014-10-24 10:34:31 +03:00
Zafar Khaja
33f6125943
Overload ExpressionParser.versionOf() for convenience
2014-10-21 23:19:24 +03:00
Zafar Khaja
370bc2b33a
Use CompositeExpression for expression building
2014-10-21 23:15:04 +03:00
Zafar Khaja
cb6bc0a72b
Rename CompositeExpression.expr property to exprTree
2014-10-21 16:22:13 +03:00
Zafar Khaja
e1aa90c2ec
Implement internal DSL for SemVer Expressions
2014-08-22 19:45:19 +03:00
Zafar Khaja
3f64b0d40b
Update copyright years
2014-08-15 15:39:26 +03:00
Zafar Khaja
d7d9c1aec2
Add @throws tag to the Version.forIntegers()'s Javadoc
2014-08-14 21:31:30 +03:00
Zafar Khaja
f3b43eee9c
Refactor ExpressionParser to improve error handling
2014-08-14 20:29:13 +03:00
Zafar Khaja
399df4d267
Add syntax error positions to the error reporting
2014-06-30 15:28:57 +03:00
Zafar Khaja
4518723d66
Amend javadoc @throws tags
2014-06-24 08:24:15 +03:00
Zafar Khaja
d36d961555
Refactor VersionParser to improve error handling
2014-06-23 21:32:16 +03:00
Zafar Khaja
82dd3c2968
Create Stream#pushBack() method
2014-06-23 21:29:02 +03:00
Zafar Khaja
e98a07dd5e
Make small improvements to exceptions
2014-06-23 21:24:23 +03:00
Zafar Khaja
77fd6f4be1
Refactor pre-release and build parsing, simplify
2014-02-05 15:07:20 +04:00
Zafar Khaja
2b77b72d71
Remove unnecessary boxing to Character
2014-02-03 10:07:12 +04:00
Zafar Khaja
229a732976
Make refactoring, small improvements
2014-02-03 10:05:26 +04:00
Zafar Khaja
4ffac6d39f
Override UnexpectedCharacterException constructor
...
Override the constructor to accept the unexpected character
and optionally the expected character types.
2014-01-31 18:34:22 +04:00
Zafar Khaja
f95c18cf6c
Improve Exceptions' toString() method
2014-01-28 17:15:32 +04:00
Zafar Khaja
da3ce7c65f
Create CharType.forCharacter() method
2014-01-28 12:46:57 +04:00
Zafar Khaja
7d8b74608f
Add ILLEGAL enum constant to VersionParser.CharType
2014-01-28 12:21:33 +04:00
Zafar Khaja
2233bdf503
Create a wrapper exception for UnexpectedElementException
2014-01-28 11:23:12 +04:00
Zafar Khaja
abaca661ff
Refactor VersionParser, make some improvements
2014-01-27 19:50:07 +04:00
Zafar Khaja
371d100065
Implement fluent interface for Version.Builder
2014-01-23 18:51:41 +04:00
Zafar Khaja
988059b444
Refactor VersionParser to handle illegal inputs
2014-01-23 18:51:32 +04:00
Zafar Khaja
b312d18eaf
Make LexerException extend ParseException
2014-01-21 14:42:29 +04:00
Zafar Khaja
84b74fa602
Remove GrammarException in favor of ParseException
2014-01-21 14:36:48 +04:00
Zafar Khaja
9b2ffbc290
Refactor VersionParser.numericIdentifier()
2014-01-21 10:55:38 +04:00
Zafar Khaja
972f8b4a05
Apply minor code formatting
2014-01-21 10:54:13 +04:00
Zafar Khaja
a284c5edf2
Rename VersionParser.Char to VersionParser.CharType
2013-12-30 20:54:17 +04:00
Zafar Khaja
8fd8b46188
Rename ParserException to ParseException
2013-12-30 20:54:17 +04:00
Zafar Khaja
1c08055637
Rename UnexpectedElementTypeException
2013-12-30 20:54:17 +04:00
Zafar Khaja
591b18339e
Fix Version.hashCode() to comply w/ Version.equals()
2013-12-21 14:18:52 +04:00
Zafar Khaja
755e8de162
Make minor Javadoc corrections
2013-11-25 23:02:58 +04:00
Zafar Khaja
d39c3f439a
Get rid of 'unchecked' warnings
2013-11-20 20:21:37 +04:00
Zafar Khaja
6df67e8de2
Add missing Javadoc to the Stream's iterator class
2013-11-20 20:19:07 +04:00
Zafar Khaja
2b3855a60a
Add missing type for the BUILD_AWARE_ORDER comparator
2013-11-16 21:14:55 +04:00
Zafar Khaja
cf8d6b1960
Add Javadoc to the source code
2013-11-16 18:03:22 +04:00
Zafar Khaja
388f94915f
Create SemVer Expression parser
2013-11-16 14:52:01 +04:00
Zafar Khaja
2dc8bd8930
Create Lexer for Expression parser
...
Factored out VersionParser.CharStream into a separate
class and made it generic to use in the Lexer. Did some
refactoring of VersionParser.
2013-11-16 14:52:01 +04:00
Zafar Khaja
87bb03dd7f
Create basic Expression types
2013-11-16 14:52:00 +04:00
Zafar Khaja
fac6ece28c
Create MetadataVersion.NULL object, refactor
2013-11-16 14:51:56 +04:00
Zafar Khaja
78266dc1ca
Implement a Parser instead of RegExp
...
This commit also updates the code to comply with the SemVer 2.0.0.
2013-11-14 00:12:58 +04:00
Zafar Khaja
d0f98e3130
Remove redundant conditional statements
2013-10-29 21:47:10 +04:00
Zafar Khaja
9ce1a0b063
Rename two API methods
...
Version.lessThanOrEqualsTo() => Version.lessThanOrEqualTo()
Version.greaterThanOrEqualsTo() => Version.greaterThanOrEqualTo()
2013-10-29 21:37:20 +04:00
Zafar Khaja
670b1a77c1
Create BUILD_AWARE_ORDER comparator
2013-03-31 15:22:27 +04:00