Porting this cg/glsl shader functionality to unreal engine

I’m wondering, if it’s possible, to convert the following shader code to unreal engine via custom expressions or something similar:

Here’s the link to the shader code from unity ->
https://forum.unity3d.com/threads/transparent-shader-receive-shadows.325877/

I thought, it wouldn’t be possible for translucent material, receiving shadows. But now, unreal materials now support “surface forwardshading” model.
Ignoring the sorting issues, is it possible to apply basic shadow receiving functionality like in the shader example from the link?

Thanks in advance.