ExprRules.jl icon indicating copy to clipboard operation
ExprRules.jl copied to clipboard

Functions for declaring and working with grammars and expression trees in Julia.

Results 3 ExprRules.jl issues
Sort by recently updated
recently updated
newest added

What is the benefit of extending `Core.eval` instead of `Base.MainInclude.eval`? I.e. could [these](https://github.com/sisl/ExprRules.jl/blob/12dae5eaa546c071d4178940a19d05b56d98faee/src/ExprRules.jl#L410) lines instead be `Base.MainInclude.eval(rulenode::RuleNode, grammar::Grammar) = Core.eval(Main, get_executable(rulenode, grammar))`? This might make more sense with the desired...

```julia grammar = @grammar begin Real = x | y | z | a | b | c Real = -Real Real = Real * Real | Real + Real...

I'm new to this package, but I hit some performance bottleneck due to type instability. Particularly, `RuleNode` is not typed, so does `get_executable` (e.g. https://github.com/sisl/ExprRules.jl/blob/6c983e584473f117c1dff9111f28d621370555c2/src/ExprRules.jl#L370). As a result, programs that...