Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mega-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ DISABLE_ERRORS_LINTERS:
- PHP_PHPCSFIXER
PHP_PHPCS_ARGUMENTS:
- --standard=PSR12
RAKU_RAKU_ARGUMENTS: -I ./grammars/raku/lib/
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

**Integrations**:

- Add grammar file for Raku. (@vanillajonathan, #5576)

**Internal changes**:

**New Contributors**:
Expand Down
3 changes: 3 additions & 0 deletions grammars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ an index.
([prql.py](https://github.com/pygments/pygments/blob/master/pygments/lexers/prql.py)).
See the [demo](https://pygments.org/demo/).

- [Raku](https://raku.org/) — Grammar can be found at
[`grammars/raku/`](https://github.com/PRQL/prql/tree/main/grammars/raku/).

- [TEA](https://github.com/psemiletov/tea-qt/) — supported. The grammar is
[upstream](https://github.com/psemiletov/tea-qt/blob/master/hls/prql.xml).

Expand Down
20 changes: 20 additions & 0 deletions grammars/raku/META6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "PRQL",
"version": "0.0.1",
"description": "Grammar for PRQL",
"tags": ["data", "grammar", "pipeline", "sql"],
"source-url": "https://github.com/PRQL/prql/",
"support": {
"source": "https://github.com/PRQL/prql/",
"bugtracker": "https://github.com/PRQL/prql/issues"
},
"api": "1.0",
"production": false,
"auth": "github:PRQL",
"license": "Artistic-2.0",
"provides": {
"prql": "lib/prql.rakumod"
},
"raku": "6.*",
"meta-version": "1"
}
36 changes: 36 additions & 0 deletions grammars/raku/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Raku grammar

PRQL grammar for Raku.

## Instructions

```raku
use lib '.';
use prql;

say PRQL.parse('from employees');
say PRQL.parsefile('employees.prql');
```

## Installation

To install from source run:

zef install .

## Tests

Tests can be run individually by specifying the test filename on the command
line:

raku t/arithmetics.rakutest

To run all tests in the directory you have to install `prove6` using `zef`:

zef install App::Prove6
prove6 --lib t/

## Documentation

- https://docs.raku.org/language/grammar_tutorial
- https://docs.raku.org/language/grammars
Loading
Loading