You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make Ulf Norell's define example work in all backends #363
A bit off topic, but is there a deallocation function provided with the generated files? I haven't seen one, I've just been manually freeing recursively down the generated structs.
Activity
shlevy commentedon Apr 30, 2021
@andreasabel We just hit:
Any pointers to fix?
C: Properly implement defined rules using the empty list.
[ #363 ] move examples/definedRules.cf to examples/rules/define.cf
[ #363 ] example text for examples/define/test.cf
5 remaining items
[ #363 ] C: fixed define with list expressions
[ #363 #287 ] fixed for Java
[ #363 #287 ] fixed for Ocaml: cons, sanitization of keywords
[ #363 ] fixed for Agda: list and Integer literals
[ #363 ] fixed for Haskell/Functor
[ #363 #287 ] fixed for C++: cons, sanitization of keywords
[ #363 ] test case: Norell's example for 'define'
[ #363 #366 ] CHANGELOG
andreasabel commentedon May 18, 2021
Remaining problem (C): non-linear definitions, like:
bnfc/examples/define/test.cf
Line 25 in 228e2ef
This creates syntax trees that not trees but DAGs.
E.g. here,
xis shared. This causes problems for the C deallocator which assumes that it is dealing with a tree.shlevy commentedon May 18, 2021
A bit off topic, but is there a deallocation function provided with the generated files? I haven't seen one, I've just been manually freeing recursively down the generated structs.
andreasabel commentedon May 19, 2021
@shlevy : The deallocation is a new, yet unreleased functionality added in a9d360d (#348).
[ #363 ] C: fix doctest for prDefH
[ #363 ] C: clone duplicate uses in definitions to get absyn _tree_
andreasabel commentedon Jun 5, 2021
This has been fixed by introduction of
clone_*and the cloning of duplicate components to prevent pointer aliasing and to preserve the tree-property.