1.1.5 • Published 3 months ago

bitmark-grammar v1.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

bitmark-grammar

  • Last update July 19, 2023
Preparing the build environment

Make sure to install all necessary node modules.

$ cd bitmark-grammar
$ npm install
Tests

Test one bitmark

This command will run the parser on the target bit file and output json for it. cd to the 'src' directory and run

$ node call.js <testfilename>

Bulk testing

This command tests the parser with the included test files in /src/tests. The --diff option compares the result with the expected result in src/tests/EXPECTED.JSON. If the result is not the same as the expected, it will show up. cd to the 'src' directory and run

$ node test-all.js --diff
Using BitmarkParser in your Javascript code

First, please refer to call-test.js. It is how you integrate the parser with your Javascript code. This is basically only what you need to do.

    let parser = require('./index.js');
    ...

    // Currently the options we have are debug and trace only
    options = {
      trace: trace,
      debug: debug,
    };
    text = ...whatever text you have you want to parse.    
    let bitmark = new parser.BitmarkParser(text, options);

    // parse() returns json on success and null on parse error.
    let obj = bitmark.parse();
    if (obj)
       console.log(JSON.stringify(obj,null,4));

on your parse error catch clause
   call bitmark.get_errorJson() to get the error meesage packed in JSON format.
1.1.5

3 months ago

1.1.4

3 months ago

1.1.3

3 months ago

1.1.2

3 months ago

1.0.101

4 months ago

1.1.1

4 months ago

1.0.100

5 months ago

1.0.77

10 months ago

1.0.79

9 months ago

1.0.78

10 months ago

1.0.80

9 months ago

1.0.84

9 months ago

1.0.83

9 months ago

1.0.82

9 months ago

1.0.81

9 months ago

1.0.88

9 months ago

1.0.87

9 months ago

1.0.86

9 months ago

1.0.85

9 months ago

1.0.89

9 months ago

1.0.91

9 months ago

1.0.90

9 months ago

1.0.95

7 months ago

1.0.94

7 months ago

1.0.93

8 months ago

1.0.92

9 months ago

1.0.99

6 months ago

1.0.98

6 months ago

1.0.97

6 months ago

1.0.96

7 months ago

1.0.76

10 months ago

1.0.75

10 months ago

1.0.73

11 months ago

1.0.72

11 months ago

1.0.71

11 months ago

1.0.70

11 months ago

1.0.74

11 months ago

1.0.62

1 year ago

1.0.60

1 year ago

1.0.66

1 year ago

1.0.65

1 year ago

1.0.64

1 year ago

1.0.63

1 year ago

1.0.48

1 year ago

1.0.69

12 months ago

1.0.47

1 year ago

1.0.68

1 year ago

1.0.46

1 year ago

1.0.67

1 year ago

1.0.45

1 year ago

1.0.49

1 year ago

1.0.51

1 year ago

1.0.50

1 year ago

1.0.55

1 year ago

1.0.54

1 year ago

1.0.53

1 year ago

1.0.52

1 year ago

1.0.58

1 year ago

1.0.57

1 year ago

1.0.56

1 year ago

1.0.39

1 year ago

1.0.40

1 year ago

1.0.43

1 year ago

1.0.42

1 year ago

1.0.41

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.0

1 year ago