When using http://pastebin.com/LPA6eEre pyparsing often just ignores stuff instead of complaining when it can't handle something. This is especially true for stuff within "suite". Is there any way to tell pyparsing to fail fast and loud if it can't handle something instead of ignoring it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2013-04-16
I'm not on a machine with pyparsing, so can't try your pastebin example at the moment.
But can you be more specific about the "stuff" it ignores? It might be an issue with your
grammar. If a parser (any parser) can't "handle" something and the grammar has
alternative rules, the parser has to try to use those alternatives. That's not ignoring
something. That's parsing according to the grammar.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2013-04-16
What is BUILTINS on line 167? Mine isn't compiling without that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2013-04-16
Thanks for trying to help DangGriffith. I think I figured it out. When calling parseFile if I pass parseAll=True it will fail if there's unexpected stuff at the end. Also removing "empty" from "suite" helped a lot.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
When using http://pastebin.com/LPA6eEre pyparsing often just ignores stuff instead of complaining when it can't handle something. This is especially true for stuff within "suite". Is there any way to tell pyparsing to fail fast and loud if it can't handle something instead of ignoring it?
I'm not on a machine with pyparsing, so can't try your pastebin example at the moment.
But can you be more specific about the "stuff" it ignores? It might be an issue with your
grammar. If a parser (any parser) can't "handle" something and the grammar has
alternative rules, the parser has to try to use those alternatives. That's not ignoring
something. That's parsing according to the grammar.
Running this http://pastebin.com/ijT3dVmt through it only catches the top 9 lines
What is BUILTINS on line 167? Mine isn't compiling without that.
Thanks for trying to help DangGriffith. I think I figured it out. When calling parseFile if I pass parseAll=True it will fail if there's unexpected stuff at the end. Also removing "empty" from "suite" helped a lot.