Comments (1)
The error message isn't great, but it's not a compiler bug:
dsl::must(...)
isn't a rule, so can't be composed with one. Instead, it must be used in the formdsl::must(...).error<my_error>
: https://lexy.foonathan.net/reference/dsl/error/#mustdsl::identifier()
expects a character class, not another rule: https://lexy.foonathan.net/reference/dsl/identifier/#identifier- you don't actually create a production: the rule must be part of a type with a
rule
andvalue
member. - This isn't an error, but you don't actually need
dsl::must
in lexy in 99% of situations (and it does something completely different frompegtl::must
, maybe the name isn't ideal). Backtracking in lexy is controlled via>>
.
I don't think your PEGTL grammar works, but this is code that parses a function declaration, maybe that helps: https://lexy.foonathan.net/playground/?id=dGGWMn37z&mode=tree
from lexy.
Related Issues (20)
- Including lexy in CMake project forces use of C++20 HOT 2
- Implement Top level Language Parser
- example-or-fix-request: delimited-dsl where closing delimiter is also an escape leader HOT 1
- Pruduction is not a branch rule HOT 1
- Unicode-aware identifier in calculator example does not work HOT 3
- Example for Callback lexy::new_ in documentation appears to be incorrect. HOT 1
- Support case folding in `lexy::as_string` callback
- Add bounded integer parsing HOT 3
- Turn `dsl::terminator(branch)` into a branch
- Documention is unreadable if TOC takes too much space HOT 1
- Any plan to support grammar-file writing dsl rule? HOT 1
- benchmar compile errors HOT 1
- Infinite compilation caused by dsl::times with separator and automatic whitespace HOT 1
- dsl for real numbers HOT 9
- [Question] dsl::integer and negative numbers HOT 1
- lexy_ext::report_error on Windows 10 (MSVC) HOT 1
- `utf8_char_encoding::eof()` produces warning C4310 on MSVC HOT 1
- Runtime error (assert failed) on print tree HOT 1
- Custom allocator causes fold_inplace cannot be compiled on MSVC HOT 1
- missing lexyConfig.cmake.in in release file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lexy.