## [Wolfram Language (Mathematica)], 52 bytes ToExpression@*StringReplace[{"["->"Prime[",""->"1"}] [Try it online!][TIO-jb4wxj5t] [Wolfram Language (Mathematica)]: https://www.wolfram.com/wolframscript/ [TIO-jb4wxj5t]: https://tio.run/##y00syUjNTSzJTE78H1CUmVei4KCloPE/JN@1oqAotbg4Mz/PQSu4BCiTHpRakJOYnBpdrRStpGunBFSdmxqtpKME4hgq1cb@11TQd1Co5lJQUFLSUVCKjgWT0bEQOhbGBwrARGByIEm4KoQ@JL0wXSDDwYrAAqjCYAPBIshCYFVgQZgsXBICYqEAQw9EJhpiXWwshhNwQiWu2v8A "Wolfram Language (Mathematica) – Try It Online" Input uses brackets. Transforms the input into a Mathematica expression that computes the result. We do this by replacing `[` with `Prime[` inserting `1` into every postition except in front of those `[` we already replaced. This works because concatenation *is* multiplication in Mathematica.