I'm trying to write a lens to parse Xen configuration files (xend-config.sxp) which is a very lisp-like format "(key value) (key2 (key value))" and I'm getting nowhere. I've learned a lot from working through the tutorials. However I've also realized that I don't remember enough from my parsing and compilers class back in college :-). (it was more than 20 years ago)
If you don't mind some noob questions.... 1. The Schema Tutorial (http://augeas.net/docs/writing-schemas.html) doesn't explain what |=| means. I assume it is just a "pointer" to where the ambiguity starts. Clarification, please? 2. I keep getting "ambiguous iteration" errors. Unsurprisingly, I remember this being difficult for me to grasp when I was in college doing homework assignments in Yacc. Is there a technique for diagnosing and fixing these? A rule of thumb for avoiding them? The tutorials are great in that they go through the debugging process but they don't explain the thinking that leads to the changes made to fix the bugs as they are found. I'd be glad to work with someone to improve them. Thanks, Tom Limoncelli P.S. As an example, the error I'm dealing with right now is: $ augparse -I. tests/test_xendconfsxp.aug Syntax error in lens definition./xendconfsxp.aug:25.0-.44:Failed to compile lns./xendconfsxp.aug:25.10-.44:exception: ambiguous iteration Iterated regexp: /\\([\t\n ]*[0-9A-Z\\a-z-]+[\t\n ]+[^\t\n ]+[\t\n ]*\\)|[\t ]*#[\t ]*([^\t\n ].*[^\t\n ]|[^\t\n ])[\t ]*\n|[\t ]*\n/ '(A\nA)#)\n' can be split into '(A\nA)|=|#)\n' and '(A\nA)#)|=|\n' Iterated lens: ./xendconfsxp.aug:25.12-.41: -- See you in Boston! Dec 4-9, Boston, Usenix LISA, www.usenix.org/event/lisa11 Dec 4-5, Boston, ACM CHIMIT, chimit.acm.org _______________________________________________ augeas-devel mailing list augeas-devel@redhat.com https://www.redhat.com/mailman/listinfo/augeas-devel