From 0a0331c5f389c4a6574d42e7c2ad9811fdc6f443 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Silva Date: Sun, 26 Oct 2014 22:26:04 -0200 Subject: Fix parsing for AM macros and support for zero sized circle primitives --- gerber/rs274x.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gerber') diff --git a/gerber/rs274x.py b/gerber/rs274x.py index 627fcf9..08c492a 100644 --- a/gerber/rs274x.py +++ b/gerber/rs274x.py @@ -127,11 +127,11 @@ class GerberParser(object): MO = r"(?PMO)(?P(MM|IN))" IP = r"(?PIP)(?P(POS|NEG))" LP = r"(?PLP)(?P(D|C))" - AD_CIRCLE = r"(?PAD)D(?P\d+)(?PC)[,](?P[^,]*)" - AD_RECT = r"(?PAD)D(?P\d+)(?PR)[,]?(?P[^,]+)?" + AD_CIRCLE = r"(?PAD)D(?P\d+)(?PC)[,]?(?P[^,]*)?" + AD_RECT = r"(?PAD)D(?P\d+)(?PR)[,](?P[^,]*)" AD_OBROUND = r"(?PAD)D(?P\d+)(?PO)[,](?P[^,]*)" AD_POLY = r"(?PAD)D(?P\d+)(?PP)[,](?P[^,]*)" - AD_MACRO = r"(?PAD)D(?P\d+)(?P{name})[,]?(?P[^,]+)?".format(name=NAME) + AD_MACRO = r"(?PAD)D(?P\d+)(?P{name})[,]?(?P[^,]*)?".format(name=NAME) AM = r"(?PAM)(?P{name})\*(?P.*)".format(name=NAME) # begin deprecated -- cgit