Skip to content
Snippets Groups Projects
Commit db692be1 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Improved preprocessor.

parent b04cf62c
No related branches found
No related tags found
No related merge requests found
......@@ -103,3 +103,5 @@ Division of 0 by 1 reduces to 0.
- No matches for sin(pi), sin(2pi), sin(4pi), etc...
- Line generator: 'der(f(x), x)' -> 'd/dx f(x)'
- Create unit tests for parser preprocessor.
......@@ -160,6 +160,7 @@ class Parser(BisonParser):
# - "a4" with "a^4".
pattern = ('(?:(\))\s*(\()' # )( -> ) * (
+ '|(\))\s*(\[)' # )[ -> ) * [
+ '|([\x00-\x09\x0b-\x19a-z0-9])\s*(\()' # a( -> a * (
+ '|(\))\s*([\x00-\x09\x0b-\x19a-z0-9])' # )a -> ) * a
+ '|([\x00-\x09\x0b-\x19a-z])\s*'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment