verbose error with ocamlyacc

后端 未结 2 751
日久生厌
日久生厌 2021-01-07 03:36

In bison, it is sufficient to add

%verbose-error 

to the file to make the parser errors more verbose. Is there any way to gain similar func

2条回答
  •  孤城傲影
    2021-01-07 04:18

    In the Parsing module (you can check it here) there is the function Parsing.set_trace that will do just that. You can use it as:Parsing.set_trace True to enable. Also, you can run ocamlyacc with the -v argument and it will output a .output, listing all states and trasitions.

提交回复
热议问题