summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-04-07 18:22:02 -0300
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-04-07 18:22:02 -0300
commitb93804ed9a3400099afceacfe5a809ae8bded2a4 (patch)
tree572889ae424748dbb8e0d015aa42b76ca6b20c69 /gerber/rs274x.py
parentb9b20a9644ca7b87493ca5786e2a25ecab132b75 (diff)
downloadgerbonara-b93804ed9a3400099afceacfe5a809ae8bded2a4.tar.gz
gerbonara-b93804ed9a3400099afceacfe5a809ae8bded2a4.tar.bz2
gerbonara-b93804ed9a3400099afceacfe5a809ae8bded2a4.zip
Add unspecified FS D leading zeros format
FS D leading zero format (probably form Direct) is an unspecified coordinate format where all numbers are specified with both leading and trailing zeros.
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index a3a27e9..07fce17 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -139,12 +139,9 @@ class GerberParser(object):
NUMBER = r"[\+-]?\d+"
DECIMAL = r"[\+-]?\d+([.]?\d+)?"
STRING = r"[a-zA-Z0-9_+\-/!?<>”’(){}.\|&@# :]+"
- NAME = r"[a-zA-Z_$][a-zA-Z_$0-9]+"
- FUNCTION = r"G\d{2}"
+ NAME = r"[a-zA-Z_$\.][a-zA-Z_$\.0-9+\-]+"
- COORD_OP = r"D[0]?[123]"
-
- FS = r"(?P<param>FS)(?P<zero>(L|T))?(?P<notation>(A|I))X(?P<x>[0-7][0-7])Y(?P<y>[0-7][0-7])"
+ FS = r"(?P<param>FS)(?P<zero>(L|T|D))?(?P<notation>(A|I))X(?P<x>[0-7][0-7])Y(?P<y>[0-7][0-7])"
MO = r"(?P<param>MO)(?P<mo>(MM|IN))"
LP = r"(?P<param>LP)(?P<lp>(D|C))"
AD_CIRCLE = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>C)[,]?(?P<modifiers>[^,]*)?"