Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Error: number with plus sign #2556

Closed
zengfanfan opened this issue Jun 19, 2024 · 1 comment
Closed

Syntax Error: number with plus sign #2556

zengfanfan opened this issue Jun 19, 2024 · 1 comment

Comments

@zengfanfan
Copy link

zengfanfan commented Jun 19, 2024

Version

2.1.7

Hardware / Firmware

GRBL 1.1

What happened

Report syntax error on valid number when opening nc file.

image

How to reproduce

open this file:

G21
G90
F8000
G1G90 Z5.0F8000
G1G90 Z5.0F8000
G0 X+2.073Y-3.64F8000
G1G90 Z0.0F8000
G0 X+2.29Y-3.831F8000
G0 X+2.395Y-4.032F8000
G0 X+2.412Y-4.6F8000
G1G90 Z5.0F8000
G0 X+0.96Y-5.724F8000
G1G90 Z0.0F8000
G0 X+1.908Y-5.56F8000
G0 X+2.101Y-5.567F8000
G0 X+2.185Y-5.64F8000
G0 X+2.241Y-5.859F8000
G0 X+2.24Y-6.225F8000
G0 X+2.136Y-7.392F8000
G0 X+2.142Y-8.029F8000
G0 X+2.812Y-7.041F8000
G1G90 Z5.0F8000
G0 X+3.828Y-3.267F8000
G1G90 Z0.0F8000
G0 X+4.098Y-3.568F8000
G0 X+4.569Y-4.316F8000
G0 X+4.679Y-4.201F8000
G1G90 Z5.0F8000
G0 X+5.749Y-3.214F8000
G1G90 Z0.0F8000
G0 X+5.442Y-3.769F8000
G0 X+5.213Y-4.042F8000
G0 X+4.255Y-4.693F8000
G0 X+3.836Y-4.894F8000
G0 X+3.484Y-4.966F8000
G0 X+3.82Y-5.331F8000
G0 X+3.981Y-5.696F8000
G0 X+4.228Y-6.546F8000
G0 X+3.799Y-5.481F8000
G0 X+3.781Y-5.222F8000
G0 X+3.871Y-5.079F8000
G0 X+4.164Y-4.908F8000
G0 X+4.597Y-4.76F8000
G0 X+5.179Y-4.649F8000
G0 X+5.59Y-4.619F8000
G0 X+5.927Y-4.693F8000
G0 X+5.937Y-4.881F8000
G0 X+5.74Y-5.244F8000
G0 X+5.365Y-5.646F8000
G0 X+4.858Y-6.024F8000
G0 X+4.478Y-6.243F8000
G0 X+4.192Y-6.338F8000
G0 X+5.014Y-5.966F8000
G0 X+5.697Y-5.521F8000
G0 X+5.41Y-5.92F8000
G0 X+4.487Y-7.572F8000
G0 X+4.151Y-8.073F8000
G0 X+3.737Y-8.621F8000
G0 X+3.567Y-8.686F8000
G0 X+3.735Y-8.393F8000
G1G90 Z5.0F8000
G0 X+5.233Y-6.366F8000
G1G90 Z0.0F8000
G0 X+5.243Y-6.896F8000
G0 X+5.092Y-8.195F8000
G0 X+5.137Y-8.293F8000
G0 X+5.262Y-8.382F8000
G0 X+5.568Y-8.475F8000
G0 X+6.337Y-8.451F8000
G0 X+7.236Y-8.265F8000
G0 X+7.259Y-7.056F8000
G0 X+7.308Y-6.793F8000
G1G90 Z5.0F8000
G0 X+9.629Y-3.186F8000
G1G90 Z0.0F8000
G0 X+9.713Y-3.576F8000
G0 X+9.738Y-4.264F8000
G0 X+9.671Y-5.139F8000
G0 X+9.556Y-6.004F8000
G0 X+9.212Y-7.41F8000
G0 X+9.772Y-7.575F8000
G0 X+10.147Y-7.793F8000
G0 X+11.417Y-9.027F8000
G0 X+11.292Y-8.332F8000
G1G90 Z5.0F8000
G0 X+10.736Y-5.345F8000
G1G90 Z0.0F8000
G0 X+10.541Y-6.359F8000
G0 X+10.284Y-7.045F8000
G0 X+9.943Y-7.707F8000
G0 X+9.531Y-8.313F8000
G0 X+9.14Y-8.697F8000
G0 X+8.72Y-8.927F8000
G0 X+8.409Y-8.941F8000
G0 X+8.23Y-8.842F8000
G1G90 Z5.0F8000
G0 X+8.383Y-6.156F8000
G1G90 Z0.0F8000
G0 X+8.684Y-6.143F8000
G0 X+9.152Y-5.987F8000
G0 X+10.342Y-5.456F8000
G0 X+10.8Y-5.359F8000
G1G90 Z5.0F8000
G0 X+11.734Y-3.866F8000
G1G90 Z0.0F8000
G0 X+12.192Y-3.745F8000
G0 X+12.607Y-3.758F8000
G0 X+12.872Y-3.856F8000
G0 X+13.035Y-4.074F8000
G0 X+13.034Y-4.443F8000
G0 X+12.506Y-5.498F8000
G0 X+12.478Y-5.749F8000
G0 X+12.589Y-6.047F8000
G0 X+12.992Y-6.623F8000
G0 X+13.165Y-7.02F8000
G0 X+13.238Y-7.412F8000
G0 X+13.228Y-7.802F8000
G0 X+13.006Y-8.403F8000
G0 X+12.818Y-8.516F8000
G0 X+12.589Y-8.454F8000
G0 X+11.712Y-7.772F8000
G0 X+11.057Y-7.346F8000
G0 X+10.91Y-7.15F8000
G0 X+10.945Y-7.074F8000
G0 X+11.378Y-6.847F8000
G0 X+14.63Y-5.595F8000
G1G90 Z5.0F8000
G0 X+16.573Y-3.378F8000
G1G90 Z0.0F8000
G0 X+16.416Y-3.966F8000
G0 X+16.117Y-4.495F8000
G0 X+15.832Y-4.827F8000
G0 X+15.42Y-5.103F8000
G0 X+15.8Y-5.731F8000
G0 X+15.941Y-6.344F8000
G0 X+15.952Y-6.992F8000
G0 X+15.883Y-7.593F8000
G0 X+15.721Y-8.323F8000
G0 X+15.682Y-8.446F8000
G0 X+15.618Y-8.448F8000
G0 X+15.616Y-7.746F8000
G0 X+15.679Y-7.245F8000
G0 X+15.827Y-6.735F8000
G0 X+16.085Y-6.257F8000
G0 X+16.689Y-5.396F8000
G0 X+17.179Y-4.922F8000
G0 X+17.426Y-4.829F8000
G0 X+17.513Y-5.175F8000
G0 X+17.389Y-6.257F8000
G0 X+17.339Y-7.395F8000
G0 X+17.458Y-8.8F8000
G0 X+16.704Y-7.704F8000
G0 X+16.158Y-7.138F8000
G0 X+16.158Y-7.059F8000
G0 X+16.301Y-6.891F8000
G0 X+16.574Y-6.724F8000
G0 X+16.8Y-6.674F8000
G0 X+16.91Y-6.804F8000
G0 X+16.814Y-7.352F8000
G0 X+16.473Y-7.987F8000
G0 X+15.867Y-8.668F8000
G0 X+16.901Y-7.647F8000
G0 X+17.88Y-6.833F8000
G1G90 Z5.0F8000
G0 X+19.974Y-3.115F8000
G1G90 Z0.0F8000
G0 X+19.693Y-3.447F8000
G0 X+18.926Y-4.684F8000
G0 X+18.483Y-5.225F8000
G0 X+17.912Y-5.726F8000
G0 X+18.429Y-5.673F8000
G0 X+19.615Y-5.413F8000
G0 X+20.031Y-5.395F8000
G0 X+20.27Y-5.482F8000
G0 X+20.431Y-5.794F8000
G0 X+20.48Y-6.419F8000
G0 X+20.268Y-7.811F8000
G0 X+19.848Y-9.678F8000
G0 X+19.758Y-9.825F8000
G0 X+19.651Y-9.776F8000
G0 X+19.389Y-9.398F8000
G0 X+18.759Y-8.203F8000
G0 X+18.296Y-7.462F8000
G0 X+18.162Y-7.045F8000
G0 X+18.18Y-6.962F8000
G0 X+18.335Y-6.934F8000
G0 X+19.343Y-7.28F8000
G0 X+19.956Y-7.36F8000
G1G90 Z5.0F8000
G0 X+22.527Y-4.357F8000
G1G90 Z0.0F8000
G0 X+22.821Y-4.46F8000
G0 X+23.207Y-4.421F8000
G0 X+24.315Y-4.162F8000
G0 X+24.79Y-4.01F8000
G0 X+24.913Y-3.939F8000
G0 X+24.741Y-3.99F8000
G1G90 Z5.0F8000
G0 X+23.671Y-2.759F8000
G1G90 Z0.0F8000
G0 X+23.811Y-3.529F8000
G0 X+23.848Y-4.216F8000
G0 X+23.788Y-4.926F8000
G0 X+23.628Y-5.587F8000
G1G90 Z5.0F8000
G0 X+21.27Y-5.847F8000
G1G90 Z0.0F8000
G0 X+23.814Y-5.211F8000
G0 X+25.928Y-4.794F8000
G0 X+25.458Y-4.962F8000
G1G90 Z5.0F8000
G0 X+22.707Y-5.295F8000
G1G90 Z0.0F8000
G0 X+22.756Y-5.562F8000
G0 X+22.866Y-5.791F8000
G0 X+23.319Y-6.568F8000
G0 X+24.301Y-5.444F8000
G0 X+24.562Y-5.3F8000
G0 X+24.613Y-5.296F8000
G0 X+24.632Y-5.368F8000
G0 X+24.385Y-5.775F8000
G0 X+23.827Y-6.246F8000
G0 X+22.99Y-6.7F8000
G0 X+22.15Y-6.957F8000
G0 X+25.16Y-6.445F8000
G0 X+23.007Y-7.563F8000
G0 X+22.139Y-7.915F8000
G0 X+24.542Y-7.522F8000
G0 X+25.237Y-7.36F8000
G0 X+25.409Y-7.305F8000
G0 X+25.466Y-7.27F8000
G0 X+25.356Y-7.288F8000
G1G90 Z5.0F8000
G0 X+23.816Y-6.854F8000
G1G90 Z0.0F8000
G0 X+23.912Y-8.232F8000
G0 X+23.837Y-10.355F8000
G1G90 Z5.0F8000
G0 X+28.818Y-3.22F8000
G1G90 Z0.0F8000
G0 X+28.74Y-3.349F8000
G0 X+28.757Y-3.547F8000
G0 X+29.186Y-4.085F8000
G0 X+29.293Y-4.349F8000
G0 X+29.231Y-4.485F8000
G0 X+29.072Y-4.603F8000
G0 X+27.966Y-5.183F8000
G0 X+28.338Y-5.133F8000
G0 X+29.829Y-4.728F8000
G0 X+29.967Y-4.74F8000
G0 X+29.957Y-4.866F8000
G0 X+29.604Y-5.368F8000
G0 X+28.968Y-6.023F8000
G0 X+27.284Y-7.643F8000
G0 X+26.95Y-7.895F8000
G0 X+27.557Y-7.522F8000
G1G90 Z5.0F8000
G0 X+29.126Y-6.308F8000
G1G90 Z0.0F8000
G0 X+28.987Y-6.741F8000
G0 X+28.955Y-7.887F8000
G0 X+28.843Y-9.076F8000
G0 X+28.717Y-9.57F8000
G0 X+28.667Y-9.578F8000
G0 X+28.793Y-9.24F8000
G1G90 Z5.0F8000
G0 X+28.92Y-6.807F8000
G1G90 Z0.0F8000
G0 X+29.396Y-7.145F8000
G0 X+29.731Y-7.457F8000
G1G90 Z5.0F8000
G0 X+30.446Y-3.808F8000
G1G90 Z0.0F8000
G0 X+31.097Y-3.701F8000
G0 X+32.716Y-3.609F8000
G0 X+31.231Y-4.47F8000
G0 X+30.971Y-4.688F8000
G0 X+30.78Y-5.015F8000
G0 X+30.73Y-5.366F8000
G0 X+30.778Y-5.62F8000
G0 X+30.867Y-5.785F8000
G0 X+30.999Y-5.9F8000
G0 X+30.868Y-5.471F8000
G0 X+30.696Y-5.119F8000
G0 X+30.72Y-4.987F8000
G0 X+30.983Y-4.795F8000
G0 X+31.552Y-4.616F8000
G0 X+32.128Y-4.547F8000
G0 X+32.687Y-4.565F8000
G0 X+32.686Y-4.657F8000
G0 X+32.331Y-5.036F8000
G0 X+31.604Y-5.553F8000
G0 X+30.838Y-5.993F8000
G0 X+32.073Y-5.46F8000
G0 X+32.164Y-5.436F8000
G0 X+32.221Y-5.535F8000
G1G90 Z5.0F8000
G0 X+30.347Y-7.051F8000
G1G90 Z0.0F8000
G0 X+30.82Y-9.21F8000
G0 X+30.046Y-7.479F8000
G0 X+30.024Y-7.343F8000
G0 X+30.086Y-7.205F8000
G0 X+30.47Y-6.986F8000
G0 X+31.135Y-6.744F8000
G0 X+32.552Y-6.375F8000
G0 X+33.433Y-6.326F8000
G0 X+33.604Y-6.404F8000
G0 X+33.69Y-6.643F8000
G0 X+33.653Y-7.085F8000
G0 X+33.168Y-8.744F8000
G0 X+33.077Y-8.763F8000
G0 X+31.692Y-8.41F8000
G0 X+30.988Y-8.284F8000
G0 X+32.681Y-7.07F8000
G0 X+32.701Y-7.017F8000
G0 X+32.626Y-6.971F8000
G0 X+31.952Y-6.831F8000
G0 X+31.881Y-6.875F8000
G0 X+31.973Y-7.628F8000
G0 X+31.964Y-8.041F8000
G0 X+31.89Y-8.408F8000
G0 X+31.67Y-8.778F8000
G0 X+31.515Y-8.869F8000
G0 X+32.574Y-8.423F8000
G1G90 Z5.0F8000
G0 X+34.951Y-5.012F8000
G1G90 Z0.0F8000
G0 X+35.342Y-5.477F8000
G0 X+35.552Y-5.977F8000
G0 X+35.665Y-6.472F8000
G0 X+35.73Y-7.139F8000
G1G90 Z5.0F8000
G0 X+34.88Y-5.622F8000
G1G90 Z0.0F8000
G0 X+35.292Y-5.322F8000
G0 X+36.398Y-4.805F8000
G0 X+36.758Y-4.731F8000
G0 X+36.958Y-4.801F8000
G0 X+37.043Y-5.145F8000
G0 X+36.906Y-5.783F8000
G0 X+36.535Y-6.466F8000
G0 X+36.185Y-6.884F8000
G0 X+35.764Y-7.171F8000
G0 X+37.269Y-6.275F8000
G0 X+37.783Y-6.047F8000
G1G90 Z5.0F8000
G0 X+37.945Y-4.083F8000
G1G90 Z0.0F8000
G0 X+40.277Y-3.447F8000
G0 X+40.703Y-3.418F8000
G0 X+40.849Y-3.456F8000
G0 X+40.806Y-3.709F8000
G0 X+40.385Y-4.279F8000
G0 X+38.978Y-5.505F8000
G0 X+38.541Y-5.786F8000
G0 X+40.587Y-4.644F8000
G1G90 Z5.0F8000
G0 X+38.343Y-4.29F8000
G1G90 Z0.0F8000
G0 X+38.279Y-5.166F8000
G0 X+37.915Y-6.997F8000
G0 X+37.557Y-7.986F8000
G0 X+37.146Y-8.784F8000
G0 X+36.782Y-9.282F8000
G0 X+36.595Y-9.414F8000
G1G90 Z5.0F8000
G0 X+41.189Y-6.067F8000
G1G90 Z0.0F8000
G0 X+40.905Y-6.212F8000
G0 X+40.025Y-6.992F8000
G0 X+39.535Y-7.345F8000
G0 X+39.062Y-7.605F8000
G1G90 Z5.0F8000
G0 X+39.175Y-5.675F8000
G1G90 Z0.0F8000
G0 X+39.279Y-6.445F8000
G0 X+39.287Y-7.025F8000
G0 X+39.085Y-8.208F8000
G0 X+38.84Y-8.957F8000
G0 X+38.881Y-9.031F8000
G0 X+39.585Y-9.128F8000
G0 X+40.145Y-9.118F8000
G0 X+40.678Y-9.051F8000
G0 X+41.716Y-8.759F8000
G0 X+41.852Y-8.657F8000
G0 X+41.904Y-8.423F8000
G0 X+41.658Y-7.393F8000
G1G90 Z5.0F8000
G0 X+42.64Y-4.738F8000
G1G90 Z0.0F8000
G0 X+42.714Y-4.567F8000
G0 X+42.88Y-4.431F8000
G0 X+43.521Y-4.225F8000
G0 X+43.852Y-4.195F8000
G0 X+44.125Y-4.2F8000
G0 X+44.505Y-4.318F8000
G0 X+44.739Y-4.602F8000
G0 X+44.784Y-4.808F8000
G0 X+44.748Y-5.018F8000
G0 X+44.018Y-6.48F8000
G0 X+43.878Y-7.063F8000
G0 X+43.929Y-7.288F8000
G1G90 Z5.0F8000
G0 X+44.112Y-8.29F8000
G1G90 Z0.0F8000
G0 X+44.045Y-8.397F8000
G0 X+44.0Y-8.659F8000
G1G90 Z5.0F8000
G0 X+46.528Y-3.904F8000
G1G90 Z0.0F8000
G0 X+46.476Y-5.348F8000
G0 X+46.395Y-6.179F8000
G0 X+46.384Y-7.464F8000
G1G90 Z5.0F8000
G0 X+46.34Y-8.6F8000
G1G90 Z0.0F8000
G0 X+46.504Y-9.052F8000
G1G90 Z5.0F8000
G1G90 Z5.0F8000
G90G0 X0Y0

Operating System

windows 10 22H2

Anything else

According to (http://linuxcnc.org/docs/2.8/html/gcode/overview.html#_number) :

A number consists of (1) an optional plus or minus sign, followed by (2) zero to many digits, followed, possibly, by (3) one decimal point, followed by (4) zero to many digits - provided that there is at least one digit somewhere in the number.

@breiler
Copy link
Collaborator

breiler commented Jun 20, 2024

Handled in #2557

It is available in the latest nightly build: https://github.com/winder/Universal-G-Code-Sender?tab=readme-ov-file#downloads

@breiler breiler closed this as completed Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants