Hitting the wall; what am I doing wrong?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
Línea de trabajo
Comienza con parser_fwd.hpp y libs/parser.cpp alrededor de la línea 187, y después reproduce la compilación de MSVC del commit 2ef0a54 para observar el bloqueo de la compilación. Investiga si la compilación separada de la gramática, los atributos shared_ptr de AST o el número de reglas explican el comportamiento; se considerará completado cuando haya una explicación confirmada o una guía documentada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hitting the Wall when Compiling the Grammar
I've been developing a parser for a fractal renderer formula file. Things were progressing nicely as I started parsing larger and larger elements of the format until I seemingly hit a wall. As of commit 2ef0a54 on the formula-compiler repository, I can't seem to add any more rules or the compilation just hangs on msvc. Note that it doesn't error, it just seems to get stuck compiling. I don't see any high activity bars on my disk or my CPU, so I'm not sure what the compiler is doing. But it ran for many minutes and didn't finish compiling parser.cpp.
Separate Compilation?
The header parser_fwd.hpp made me think that I might be able to break my parser into multiple source files and reduce the pressure on template mechanisms. I had noticed that the compile time for the parser was increasing as I added more details into my parser, but I considered this normal, especially as I was building Debug. However, I tried my best to separate out a simple rule into a separate translation unit and was unsuccessful. GitHub Copilot gave it a try, but only flailed around for 30 minutes before I put it out of it's misery.
Is there a mechanism for separate compilation of parts of a grammar? None of the examples demonstrate separate compilation.
My AST is a Hierarchy of Node shared_ptrs
The documentation recommends using the synthesized attributes for rules, but there doesn't seem to be automatic attribute propagation to shared_ptrs as the attributes. Therefore I need semantic action builder functions to create the attribute in my AST from the attribute synthesized by the framework. Is this putting additional template pressure on the compiler?
How Does the Number of Rules Impact Compilation?
I can create local parsers, e.g. const auto alpha = char_('a', 'z') | char_('A', 'Z'); without rules and use them to build productions that generate AST nodes. I also have a bunch of rules (see parser.cpp line 187). Should I be preferring fewer rules to reduce template pressure on the compiler or are they the same cost as the local parsers?
- Lenguaje dominante
- C++
- Estrellas
- 182
- Forks
- 28
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de boostorg/parser
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
-
Is Boost.Parser abandoned? Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 20/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
Todos los issues de boostorg/parser
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
AXERA-TECH/ax-llm#77 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
games-on-whales/wolf#509 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
bug-unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100