itohnobue / pylasdev

LAS 2.0 and Dev files reader/editor/writer
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Not recognizing ILD .ohm.m #1

Open mralbu opened 11 years ago

mralbu commented 11 years ago

First of all, thanks for sharing pylasdev! I am starting to experiment with it. I am having problems reading files with curve descriptions with SYMBOL DOT x DOT x, from files extracted from Petrel (e.g. ILD .ohm.m : ILD) Is it possible to adapt the parser to read this symbols as well?

~Curve DEPT .m : DEPTH CALI .in : CALI FACIES . : FACIES GR .gAPI : GR ILD .ohm.m : ILD

Thanks!

Obs: Tried to adapt it myself.. Seems that changing p_name in las_lex_parser2.py to the following worked for me:

def p_name(t): """name : first_part DOT second_part | first_part DOT | first_part DOT second_part DOT third_part"""

if (len(t) == 4):

t[0] = t[1] + t[2] + t[3]

else:

t[0] = t[1] + t[2]

t[0] = t[1]

print "N", t[0]

def p_third_part(t): """third_part : third_part SYMBOL | SYMBOL""" if len(t) == 3: t[0] = t[1] + t[2] else: t[0] = t[1]

itohnobue commented 11 years ago

Thanks for sharing this :)