cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Encountered Extraneous Input

Vishaal_Arun
New Contributor II

Hi all,

I got the Extraneous input error when i compiled the below expression in Mapper,

_perm == 'F'? ["R", "W", "X"]:(_perm=='RW'?["R", "W"]:(_perm=='RE'?["R", "X"]:(_perm=='R'?["R"]:[ ]))): []

Error:
Could not compile expression: (_perm == โ€˜Fโ€™ ? [โ€œRโ€, โ€œWโ€, โ€œXโ€ โ€ฆ (Reason: Encountered extraneous input โ€˜:โ€™ at line 1:108; expecting={โ€˜||โ€™, โ€˜&&โ€™, โ€˜^โ€™, โ€˜==โ€™, โ€˜!=โ€™, โ€˜>โ€™, โ€˜<โ€™, โ€˜>=โ€™, โ€˜<=โ€™, โ€˜+โ€™, โ€˜-โ€™, โ€˜*โ€™, โ€˜/โ€™, โ€˜%โ€™, โ€˜instanceofโ€™, โ€˜inโ€™, โ€˜[โ€™, โ€˜(โ€™, โ€˜)โ€™, โ€˜.โ€™, PropertyRef}; Resolution: Please check expression syntax)

Please help me to sort it out.

Thanks in Advance!!!

2 REPLIES 2

dmiller
Admin Admin
Admin

(I placed your expression in code format so the square braces didnโ€™t just make a checkbox)


Diane Miller
Community Manager

del
Contributor III

Thatโ€™s a little bit much for me to troubleshoot. I even get a different error, so the interpreter may be having trouble with it too.

For readability, you might prefer the match operator :

match _perm {
 'F' => ["R","W","X"],
 'RW' => ["R","W"],
 'RE' => ["R","X"],
 'R' => ["R"],
 _ => []
}