With the simpler Parser module, you could just say symbol(",") and
parse all the commas you wanted. But now that we have a custom type for our
problems, we have to specify that as well. So anywhere you just used
a string in the simpler module, you now use a Token<Problem> in the advanced
module:
You can be creative with your custom type. Maybe you want a lot of detail.
Maybe you want looser categories. It is a custom type. Do what makes sense for
you!
With the simpler
Parser
module, you could just saysymbol(",")
and parse all the commas you wanted. But now that we have a custom type for our problems, we have to specify that as well. So anywhere you just used astring
in the simpler module, you now use aToken<Problem>
in the advanced module:Example
You can be creative with your custom type. Maybe you want a lot of detail. Maybe you want looser categories. It is a custom type. Do what makes sense for you!
See