Constant GRAMMAR_JSON_CSV

Source
pub const GRAMMAR_JSON_CSV: &str = "{\n  \"name\": \"csv\",\n  \"rules\": {\n    \"document\": {\n      \"type\": \"SEQ\",\n      \"members\": [\n        {\n          \"type\": \"REPEAT\",\n          \"content\": {\n            \"type\": \"SEQ\",\n            \"members\": [\n              {\n                \"type\": \"SYMBOL\",\n                \"name\": \"row\"\n              },\n              {\n                \"type\": \"PATTERN\",\n                \"value\": \"\\\\r|\\\\r\\\\n|\\\\n\"\n              }\n            ]\n          }\n        },\n        {\n          \"type\": \"CHOICE\",\n          \"members\": [\n            {\n              \"type\": \"SYMBOL\",\n              \"name\": \"row\"\n            },\n            {\n              \"type\": \"BLANK\"\n            }\n          ]\n        }\n      ]\n    },\n    \"row\": {\n      \"type\": \"CHOICE\",\n      \"members\": [\n        {\n          \"type\": \"SEQ\",\n          \"members\": [\n            {\n              \"type\": \"REPEAT\",\n              \"content\": {\n                \"type\": \"STRING\",\n                \"value\": \",\"\n              }\n            },\n            {\n              \"type\": \"SYMBOL\",\n              \"name\": \"field\"\n            },\n            {\n              \"type\": \"REPEAT\",\n              \"content\": {\n                \"type\": \"SEQ\",\n                \"members\": [\n                  {\n                    \"type\": \"REPEAT\",\n                    \"content\": {\n                      \"type\": \"STRING\",\n                      \"value\": \",\"\n                    }\n                  },\n                  {\n                    \"type\": \"SYMBOL\",\n                    \"name\": \"field\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"REPEAT\",\n              \"content\": {\n                \"type\": \"STRING\",\n                \"value\": \",\"\n              }\n            }\n          ]\n        },\n        {\n          \"type\": \"REPEAT1\",\n          \"content\": {\n            \"type\": \"STRING\",\n            \"value\": \",\"\n          }\n        }\n      ]\n    },\n    \"field\": {\n      \"type\": \"CHOICE\",\n      \"members\": [\n        {\n          \"type\": \"SYMBOL\",\n          \"name\": \"text\"\n        },\n        {\n          \"type\": \"SYMBOL\",\n          \"name\": \"number\"\n        },\n        {\n          \"type\": \"SYMBOL\",\n          \"name\": \"float\"\n        },\n        {\n          \"type\": \"SYMBOL\",\n          \"name\": \"boolean\"\n        }\n      ]\n    },\n    \"text\": {\n      \"type\": \"TOKEN\",\n      \"content\": {\n        \"type\": \"CHOICE\",\n        \"members\": [\n          {\n            \"type\": \"PATTERN\",\n            \"value\": \"[^,\\\\d\\\\s\\\"][^, \\\\n\\\\r\\\"]+\"\n          },\n          {\n            \"type\": \"SEQ\",\n            \"members\": [\n              {\n                \"type\": \"STRING\",\n                \"value\": \"\\\"\"\n              },\n              {\n                \"type\": \"REPEAT\",\n                \"content\": {\n                  \"type\": \"CHOICE\",\n                  \"members\": [\n                    {\n                      \"type\": \"PATTERN\",\n                      \"value\": \"[^\\\"]\"\n                    },\n                    {\n                      \"type\": \"STRING\",\n                      \"value\": \"\\\"\\\"\"\n                    }\n                  ]\n                }\n              },\n              {\n                \"type\": \"STRING\",\n                \"value\": \"\\\"\"\n              }\n            ]\n          }\n        ]\n      }\n    },\n    \"number\": {\n      \"type\": \"CHOICE\",\n      \"members\": [\n        {\n          \"type\": \"PATTERN\",\n          \"value\": \"\\\\d+\"\n        },\n        {\n          \"type\": \"PATTERN\",\n          \"value\": \"0[xX][0-9a-fA-F]+\"\n        }\n      ]\n    },\n    \"float\": {\n      \"type\": \"CHOICE\",\n      \"members\": [\n        {\n          \"type\": \"PATTERN\",\n          \"value\": \"\\\\d*\\\\.\\\\d+\"\n        },\n        {\n          \"type\": \"PATTERN\",\n          \"value\": \"\\\\d+\\\\.\\\\d*\"\n        }\n      ]\n    },\n    \"boolean\": {\n      \"type\": \"CHOICE\",\n      \"members\": [\n        {\n          \"type\": \"STRING\",\n          \"value\": \"true\"\n        },\n        {\n          \"type\": \"STRING\",\n          \"value\": \"false\"\n        }\n      ]\n    }\n  },\n  \"extras\": [\n    {\n      \"type\": \"PATTERN\",\n      \"value\": \"\\\\s\"\n    }\n  ],\n  \"conflicts\": [],\n  \"precedences\": [],\n  \"externals\": [],\n  \"inline\": [],\n  \"supertypes\": []\n}\n\n";
Expand description

The content of the [grammar.json][] file for CSV.