mcscope / autoblazon

Python lib to Parse and Generate Heraldic Crests (Blazoning)
7 stars 0 forks source link

blazon.lark has reference to missing file `number.lark` #1

Closed Qalthos closed 5 years ago

Qalthos commented 5 years ago

FileNotFoundError: [Errno 2] No such file or directory: 'number.lark'

%import .number (number, INT, NUMBER_WORD)

mcscope commented 5 years ago

Thanks! I hadn't checked in some files. I checked them in now. I recommend parse_blazon_from_commandline to start. One of the troubles is that it parses some arms but the parse tree isn't correct. Like this example

azure, on a bend gules, three mullets or
start
  arms
    field
      lines
        arms
          field
            tincture    azure
        ordinary_charge
          ordinary  bend
        arms
          field
            tincture    gules
          charge
            num three
            object  mullet
            attitude
              general_attitude
                tincture    or 

The gules should be the color of the bend but it's parsing it out as the start of a different set of amrs. This is the difficult part, because I think that the blazon language can actually be syntactically ambiguous (though in this case I think it isn't, this is just a bug)

mcscope commented 5 years ago

Uploaded the new file, you should be able to run it