Math-Parser
Rikki Cattermole via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat May 3 02:17:31 PDT 2014
On Friday, 2 May 2014 at 22:34:48 UTC, Tim Holzschuh via
Digitalmars-d-learn wrote:
> Hi there,
>
> I currently try to write a simple math-parser in D.
>
> However.. something isn't working and I just can't figure out
> what's the problem.
> (I'm relative new to D, and this is my first test to write a
> parser/lexer)
>
> I'm pretty sure it's a simple layer-8-problem, but I always
> overlook it.
>
> While the Lexer seems to work, the Parser just sets _index -> 0
> (and I don't understand why..).
>
> If you would take a look at [1], I'd be very thankful..
>
> Most probably this isn't a wrong use of something D-specific,
> it's more like I am stuck..^^
>
> Thank you,
> Tim
>
> [1]: https://github.com/tholzschuh/math-parser
General suggestions:
Don't commit the build ext. files along with source code and in
this case they aren't needed. Mono-D can load dub.json straight.
As well as the obj/bin directories.
With regards to your issues I have a suspicion about it being how
your parse the tokens. Within the parser.
Without really trying out atleast thats what I'm guessing.
More information about the Digitalmars-d-learn
mailing list