1.1.5 • Published 1 year ago

bitmark-grammar v1.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.101

1 year ago

1.1.1

1 year ago

1.0.100

2 years ago

1.0.77

2 years ago

1.0.79

2 years ago

1.0.78

2 years ago

1.0.80

2 years ago

1.0.84

2 years ago

1.0.83

2 years ago

1.0.82

2 years ago

1.0.81

2 years ago

1.0.88

2 years ago

1.0.87

2 years ago

1.0.86

2 years ago

1.0.85

2 years ago

1.0.89

2 years ago

1.0.91

2 years ago

1.0.90

2 years ago

1.0.95

2 years ago

1.0.94

2 years ago

1.0.93

2 years ago

1.0.92

2 years ago

1.0.99

2 years ago

1.0.98

2 years ago

1.0.97

2 years ago

1.0.96

2 years ago

1.0.76

2 years ago

1.0.75

2 years ago

1.0.73

2 years ago

1.0.72

2 years ago

1.0.71

2 years ago

1.0.70

2 years ago

1.0.74

2 years ago

1.0.62

2 years ago

1.0.60

2 years ago

1.0.66

2 years ago

1.0.65

2 years ago

1.0.64

2 years ago

1.0.63

2 years ago

1.0.48

2 years ago

1.0.69

2 years ago

1.0.47

2 years ago

1.0.68

2 years ago

1.0.46

2 years ago

1.0.67

2 years ago

1.0.45

2 years ago

1.0.49

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.58

2 years ago

1.0.57

2 years ago

1.0.56

2 years ago

1.0.39

2 years ago

1.0.40

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago