https://bugs.kde.org/show_bug.cgi?id=462969

            Bug ID: 462969
           Summary: Incorrect marking gcode as invalid
    Classification: Frameworks and Libraries
           Product: frameworks-syntax-highlighting
           Version: 5.101.0
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: syntax
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 154547
  --> https://bugs.kde.org/attachment.cgi?id=154547&action=edit
errors

SUMMARY

If you enter gcode letter in file without parameter, syntax highlighter marks
it as invalid (red underline), which is incorrect according to different
sources:

1. Most popular 3D printer firmware sometimes uses letters without numbers,
e.g. for homing axes with G28 (look for usage and examples):
https://marlinfw.org/docs/gcode/G028.html
2. It is implicitly allowed by LinuxCNC:
https://linuxcnc.org/docs/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. 

Thus, number without plus/minus signs (optional) that has zero digits
(explicitly allowed), no decimal point (optional), zero decimal digits
(explicitly allowed) is essentially no number at all.


STEPS TO REPRODUCE
1. Write gcode that has parameter letter and no number, e.g. "G28 X Y" in any
editor with syntax highlighting framework

OBSERVED RESULT
Error indication

EXPECTED RESULT
No error indicator

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Graphics Platform: Wayland

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to