Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1032665 // test_ShuntingYardParser

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9542L/53K).

set flag ShuntingYardParser_debug.

svoid test_ShuntingYardParser() {
  test_ShuntingYardParser(s -> ShuntingYardParser(s/S)!);
}

svoid test_ShuntingYardParser(IF1<S, LS> parse) {
  testFunctionValues(parse,
    "1+2*3",       splitAtSpace_trim("1 2 3 * +"),
    "-3e2",        splitAtSpace_trim("3e2 u-"),
    "-(1+2)",      splitAtSpace_trim("1 2 + u-"),
    "(1+2)-(3+4)", splitAtSpace_trim("1 2 + 3 4 + -"),
  );
}

Author comment

Began life as a copy of #1032664

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032665
Snippet name: test_ShuntingYardParser
Eternal ID of this version: #1032665/8
Text MD5: 55a2727bb6de42ddfbda6db93dba3409
Transpilation MD5: 1aabcdc49a67ae7ae4bf9c5fb6831bf1
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-08 18:29:27
Source code size: 432 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 208 / 311
Version history: 7 change(s)
Referenced in: [show references]