Skip to content

Commit

Permalink
release 0.5.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahar Soel committed Mar 6, 2016
1 parent 71c3516 commit eac80e7
Show file tree
Hide file tree
Showing 11 changed files with 120 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ deploy:
api_key:
secure: DNq1wbqLPHVpJPDx9O89HZM+RJB6v2R7/wk8pok7Z8NT72kUWdvbqcThGhczPO4sZ8cUTJ3ergTCE8hs9mynlR/lX6932U4fj4+uICQL9+G+deBB/t2SNyTBllkE64WrJ9BKmQvIk/Chh7ZJOM0Fro3p2BIq3JsVnfYg1tZ3U5o=
file:
- package/chevrotain-binaries-0.5.18.zip
- package/chevrotain-binaries-0.5.18.tar.gz
- package/chevrotain-binaries-0.5.19.zip
- package/chevrotain-binaries-0.5.19.tar.gz
on:
tags : true
all_branches: true
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chevrotain",
"version": "0.5.18",
"version": "0.5.19",
"description": "Chevrotain is a high performance fault Tolerant Javascript parsing DSL for building recursive decent parsers",
"main": "release/chevrotain.js",
"dependencies": {},
Expand Down
16 changes: 8 additions & 8 deletions docs/tutorial/step2_parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ relationalOperator

A Chevrotain Parser analyses a [Token](https://github.com/SAP/chevrotain/blob/master/src/scan/tokens_public.ts#L61) vector
that conforms to some grammar.
The grammar is defined using the [parsing DSL](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#at_least_one),
The grammar is defined using the [parsing DSL](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#at_least_one),
Which includes the following methods.

* [CONSUME](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#consume1) - 'eat' a Token.
* [SUBRULE](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#subrule1) - reference to another rule.
* [OPTION](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#option1) - optional production.
* [MANY](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#many1) - repetition zero or more.
* [AT_LEAST_ONE](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#at_least_one1) - repetition one or more.
* [MANY_SEP](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#many_sep1) - repetition (zero or more) with a separator between any two items
* [AT_LEAST_ONE_SEP](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#at_least_one_sep1) - repetition (one or more) with a separator between any two items
* [CONSUME](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#consume1) - 'eat' a Token.
* [SUBRULE](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#subrule1) - reference to another rule.
* [OPTION](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#option1) - optional production.
* [MANY](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#many1) - repetition zero or more.
* [AT_LEAST_ONE](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#at_least_one1) - repetition one or more.
* [MANY_SEP](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#many_sep1) - repetition (zero or more) with a separator between any two items
* [AT_LEAST_ONE_SEP](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#at_least_one_sep1) - repetition (one or more) with a separator between any two items


#### Lets implement our first grammar rule.
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial/step3_adding_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ validates the input conforms to the grammar. In most real world use cases the pa
result/data structure/value.

This can be accomplished using two features of the Parsing DSL:
* [CONSUME](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#consume1) will return
The [Token](http://sap.github.io/chevrotain/documentation/0_5_18/classes/token.html) instance consumed.
* [SUBRULE](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#subrule1) will return
* [CONSUME](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#consume1) will return
The [Token](http://sap.github.io/chevrotain/documentation/0_5_19/classes/token.html) instance consumed.
* [SUBRULE](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#subrule1) will return
the result on invoking the rule.


Expand Down
10 changes: 5 additions & 5 deletions docs/tutorial/step4_fault_tolerance.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Therefore the missing colon will be automatically "inserted".
This heuristic's behavior can be customized by the following methods:
* [canTokenTypeBeInsertedInRecovery](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#cantokentypebeinsertedinrecovery)
* [canTokenTypeBeInsertedInRecovery](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#cantokentypebeinsertedinrecovery)
* [getTokenToInsert](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#gettokentoinsert)
* [getTokenToInsert](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#gettokentoinsert)
### In Rule Single Token deletion:
Expand Down Expand Up @@ -204,14 +204,14 @@ from the sub-rule we have recovered from.
By default **undefined** will be returned from a recovered rule, however this should most likely be customize
in any but the most simple cases.
Customization is done during the definition of the grammar [RULE](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#rule).
Customization is done during the definition of the grammar [RULE](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#rule).
The third parameter(**invalidRet**) is a function which will be invoked to produce the returned value in case of re-sync recovery.
####Disabling Re-Sync Recovery:
Re-Sync recovery is enabled by default for all rules.
In some cases it may be appropriate to disable re-sync recovery for a specific rule.
This is (once again) done during the definition of the grammar [RULE](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#rule).
This is (once again) done during the definition of the grammar [RULE](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#rule).
The fourth argument is a boolean which can be controls whether or not re-sync is enabled for the defined rule.
Expand All @@ -224,7 +224,7 @@ additional definitions (what should be returned value of a re-synced rule?).
### Disabling All Recovery mechanisms
By default fault tolerance and error recovery heuristics are enabled.
They can be disabled by passing a optional **isErrorRecoveryEnabled** parameter (default true)
To the parser's constructor [constructor](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#constructor).
To the parser's constructor [constructor](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#constructor).
#### What is Next?
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chevrotain",
"version": "0.5.18",
"version": "0.5.19",
"description": "Chevrotain is a high performance fault tolerant javascript parsing DSL for building recursive decent parsers",
"keywords": [
"parser",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ any code generation phase.

## Documentation
* [Latest released version's HTML docs](http://sap.github.io/chevrotain/documentation)
* [Parsing DSL](http://sap.github.io/chevrotain/documentation/0_5_18/classes/parser.html#at_least_one)
* [Parsing DSL](http://sap.github.io/chevrotain/documentation/0_5_19/classes/parser.html#at_least_one)

* Annotated source code (dev version):
* [tokens_public.ts](https://github.com/SAP/chevrotain/blob/master/src/scan/tokens_public.ts)
Expand Down
14 changes: 13 additions & 1 deletion release/chevrotain.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! chevrotain - v0.5.18 - 2016-02-26 */
/*! chevrotain - v0.5.19 - 2016-03-07 */
declare namespace chevrotain {
class HashTable<V>{}
export function tokenName(clazz: Function): string;
Expand Down Expand Up @@ -680,7 +680,19 @@ declare namespace chevrotain {
protected RULE<T>(ruleName: string, impl: (...implArgs: any[]) => T, invalidRet?: () => T, doReSync?: boolean): (idxInCallingRule?: number, ...args: any[]) => T;
protected ruleInvocationStateUpdate(ruleName: string, idxInCallingRule: number): void;
protected ruleFinallyStateUpdate(): void;
/**
* Returns an "imaginary" Token to insert when Single Token Insertion is done
* Override this if you require special behavior in your grammar
* for example if an IntegerToken is required provide one with the image '0' so it would be valid syntactically
*/
protected getTokenToInsert(tokClass: Function): Token;
/**
* By default all tokens type may be inserted. This behavior may be overridden in inheriting Recognizers
* for example: One may decide that only punctuation tokens may be inserted automatically as they have no additional
* semantic value. (A mandatory semicolon has no additional semantic meaning, but an Integer may have additional meaning
* depending on its int value and context (Inserting an integer 0 in cardinality: "[1..]" will cause semantic issues
* as the max of the cardinality will be greater than the min value. (and this is a false error!)
*/
protected canTokenTypeBeInsertedInRecovery(tokClass: Function): boolean;
/**
* @param tokClass The Type of Token we wish to consume (Reference to its constructor function)
Expand Down
Loading

0 comments on commit eac80e7

Please sign in to comment.