0.3.8 • Published 6 years ago

jssgf v0.3.8

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

JSSGF

JSSGF is a parser for Smart Game Format(SGF) in JavaScript generated by Jison with faster regular expression parser in simple cases.

##Usage ###on browsers

<script src="jssgf.js"></script>
<script type="text/javascript">
console.log(jssgf.fastParse('(;C[example])'));
</script>

###on Node.js

npm install jssgf
var jssgf = require('jssgf');
console.log(jssgf.fastParse('(;C[example])'));

##Note

ValueType

No support of various ValueTypes and Compose. All PropValues are as Text.

Compilation

When you compile jssgf.jison, you will encounter the message

Conflict in grammar: multiple actions possible when lookahead token is [ in state 16
- reduce by rule: propvalues ->
- shift token (then go to state 23)
Conflict in grammar: multiple actions possible when lookahead token is WHITE_SPACE in state 17
- reduce by rule: propident -> MAYBE_PROPIDENT
- shift token (then go to state 24)
...

But jssgf.js should have been generated. Jison resolves the conflicts with higher priority to a shift.

##License MIT

0.3.8

6 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago