Mention how to deal with case described in #129

Close #130.
This commit is contained in:
mrkkrp 2016-08-01 22:00:36 +03:00
parent 33098be1ea
commit 38dd2112e3

View File

@ -54,6 +54,12 @@ data Operator m a
-- This is not done by default because in some cases you don't want to allow -- This is not done by default because in some cases you don't want to allow
-- repeating prefix or postfix operators. -- repeating prefix or postfix operators.
-- --
-- If you want to have an operator that is a prefix of another operator in
-- the table, use the following (or similar) wrapper instead of plain
-- 'symbol':
--
-- > op n = (lexeme . try) (string n <* notFollowedBy punctuationChar)
--
-- @makeExprParser@ takes care of all the complexity involved in building an -- @makeExprParser@ takes care of all the complexity involved in building an
-- expression parser. Here is an example of an expression parser that -- expression parser. Here is an example of an expression parser that
-- handles prefix signs, postfix increment and basic arithmetic: -- handles prefix signs, postfix increment and basic arithmetic: