Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COYes, I had implemented the shunting yard algoritm but it, as you say, requires that you have already identified the - and the + as either unary +, - or the binary variations. I ended up using some changed parsing code to beter decide what I am dealing with. I do not want to change the actual expression because I need to write back the parsed expression again. Still, I have some troubles deciding when to write back unary operators to the RPN output. I'll have another look at the algorythm.
      singulars
    2. CO@Jaapjan. RPN evaluation needs to know how many arguments an operator takes. The proper way to do this would be with a grammar which can tell when + is unary and when it is binary etc. btw, why does it matter if you include zeroes in the written back expression? Since you have it tagged as self-learning, it seems like that should be irrelevant.
      singulars
      1. This table or related slice is empty.
    3. COIt is self-learning because I am trying to learn how to read expressions in my source code using a program. If my program writes back 'cleaned' expressions then I prefer not to have extra zero's in them. Unfortunately it also needs to deal with variable number of parameters to functions. Hence trying to figure out how others deal with this situation. I presume for example -1--1 would become 1 neg 1 neg minus in this instance. But I do not find any clear way to deal with nested expressions with variable length functions in them... mmm.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload