Closed tian3rd closed 1 year ago
Closing criteria:
IRIREF
\] | [UCHAR](https://www.w3.org/TR/turtle/#grammar-production-UCHAR))* '>' /* #x00=NULL #x01-#x1F=control codes #x20=space */) (note there's a minor typo in the original comment of rule [
IRIREF`](https://www.w3.org/TR/turtle/#grammar-production-IRIREF))PN_CHARS_U
A better way to test different grammar rules is to write separate test cases in test files under the test folder in the package.
Refer to the test
package to get started: https://pub.dev/packages/test
Tests are here: https://github.com/anusii/rdflib/blob/main/test/naive_parser_test.dart All test cases are passed. (Have also set up GitHub actions to run the tests in the test folder: https://github.com/anusii/rdflib/issues/12, and can check the status of tests here: https://github.com/anusii/rdflib/actions/runs/3571656282/jobs/6003731947)
Closing criteria is met.
I plan to finish the rest of the tests for the grammar (all of the turtle rules) by the end of this week.
petitparser
package provides readily made terminal parsers such asletter()
,digit()
,string()
that can be used to parse simple snippets. To take a step further, we can also combine parsers together to get more complicated functions such as chaining parsers, specifying the repeated time a pattern should occur in a string, etc.For starters, refer to #625 for the tasks of parsing
IRIREF
andPN_CHARS_U
, and use combinator parsers to parse different strings.