Comments (3)
OK, I know what to do. I'll use parse_tree
and rewrite transform
to complete
thank you
from pegtl.
ActionInput need const std::vector<ActionInput>& get_childs_input()
and const ActionInput& get_parent_input()
method How can i do ?
from pegtl.
I don't want to write many applys.
Implementing many actions might be inevitable. Unless you add some intermediate layer, which could also be the parse tree from tao/pegtl/contrib/parse_tree.hpp
.
Is there a ready-made capture list?
ActionInput needconst std::vector<ActionInput>& get_childs_input()
That would require additional book-keeping which would be rather costly if it automatically kept the capture of every sub-rule. This cost should only be paid when and where necessary.
You might be able to set up some vector in the states, and a simple action that gets applied to multiple rules that merely pushes some information on to the vector, and then do all the actual processing in the action for the enclosing rule.
and
const ActionInput& get_parent_input()
method. How can i do?
I don't get the intended semantics. What should get_parent_input()
return?
Btw, the default case of check_action< Rule >
should use tao::pegtl::nothing< Rule >
as public base class.
from pegtl.
Related Issues (20)
- MSVC: error C2338: static_assert failed: 'internal::dependent_true< T > && ( begin != std::string_view::npos ) HOT 3
- Example grammar proto3 does not accept enum fields starting from zero HOT 2
- data type of input? byte? character? HOT 3
- <ciso646> is removed in C++20 and should not be included HOT 1
- Feature Request: Add defines to exclude headers to improve compile time HOT 4
- parse_tree needs to be optimized HOT 8
- Does "pegtl" support the operation of binary data serialization/deserialization? HOT 2
- Why parsing succeeds? HOT 3
- Why do I have an infinite loop? HOT 4
- parser_tree.cpp example not compiling in VS 2022, as of PEGTL 3.2.6 HOT 4
- Order independence of rules HOT 7
- list_tail<> invokes action for trailing separator twice? HOT 10
- Parsing Binary Data Encounters Left recursion Problem HOT 9
- Any consideration of ghc::filesystem HOT 8
- Can't get custom error messages to work. HOT 8
- Backreferences and grammar tracing/analyzing. HOT 5
- vs2022 编译错误 x64-windows-static\include\tao\pegtl\parse.hpp(45,38): error C2062: 意外的类型“unknown-type”
- Issues with change_action_and_state HOT 1
- Inconsistent behaviour of `sor` for custom rules. HOT 6
- standard_trace fails to compile with an action that uses change_action_and_states HOT 7
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 pegtl.