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

Problem?? comment_parser: ERROR IN PARAMETER: Parser error in comments of file #3601

Closed
MichaelAtOz opened this issue Jan 9, 2021 · 9 comments

Comments

@MichaelAtOz
Copy link
Member

MichaelAtOz commented Jan 9, 2021

I happened to have --debug=all when testing, running through the examples.
I noticed this in examples/parametric/sign.scad.

Parsing design (AST generation)...
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
parameterslider: ParameterSlider: [60.00:1.00:200.00, 82.00] - (0 - 140, 22)
parameterslider: ParameterSlider: [1.00:1.00:10.00, 2.00] - (0 - 9, 1)
Compiling design (CSG Tree generation)...

The customizer parameters look OK.
Perhaps it is /*[ group name ]*/ in the top comments?

@MichaelAtOz
Copy link
Member Author

&

Loaded design 'C:/Program Files/openscad-2021.01-RC5/examples/Parametric/candleStand.scad'.
 
Parsing design (AST generation)...
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
parameterslider: ParameterSlider: [3.00:1.00:14.00, 7.00] - (0 - 11, 4)
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Polygon2d-CGAL: Polygon2d::tessellate(): 1 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 1 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 2 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 2 outlines
Geometries in cache: 8593
Geometry cache size in bytes: 21094816
CGAL Polyhedrons in cache: 102
CGAL cache size in bytes: 209769568
Compiling design (CSG Products normalization)...
Normalized tree has 53 elements!
renderer: Renderer() start
renderer: setColorScheme
renderer: Renderer() end
renderer: Renderer() start
renderer: setColorScheme
renderer: Renderer() end
Compile and preview finished.
Total rendering time: 0:00:00.195

@thehans
Copy link
Member

thehans commented Jan 14, 2021

It looks like it prints that "error" for every customizer parameter that has no comment after it (on the same line). There are 10 errors for the candleStand, and 10 values with no comment.

For example if you put // [1:50] after all the numeric ones, it goes down to one error (only the checkbox is left, for which I don't think there is an appropriate customizer comment).

It seems to be a harmless error since the customizer apparently works fine with that file, but probably better if the parser can be altered so it doesn't count 'no comment' as an error.

@ChrisCoxArt
Copy link
Contributor

I cannot reproduce these errors in 2021.01 or the current dev build. Looks like it was fixed in the comment parser at some point.

@MichaelAtOz
Copy link
Member Author

Just now, candlestand.scad, 2021.01, Windows 7/64

OpenSCAD 2021.01
https://www.openscad.org/

Copyright (C) 2009-2021 The OpenSCAD Developers
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

QSettingsCached: QSettings::setValue(): view/showAxes = 'true'
QSettingsCached: QSettings::setValue(): view/showScaleProportional = 'true'
QSettingsCached: QSettings::setValue(): view/orthogonalProjection = 'true'
QSettingsCached: QSettings::setValue(): recentFileList = ''
QSettingsCached: QSettings::setValue(): recentFileList = ''
Loaded design 'C:/Program Files/OpenSCAD/examples/Parametric/candleStand.scad'.
 
Parsing design (AST generation)...
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
parameterslider: ParameterSlider: [3.00:1.00:14.00, 7.00] - (0 - 11, 4)
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Polygon2d-CGAL: Polygon2d::tessellate(): 1 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 1 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 2 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 2 outlines
Geometries in cache: 11
Geometry cache size in bytes: 315376
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 53 elements!
renderer: Renderer() start
renderer: setColorScheme
renderer: Renderer() end
renderer: Renderer() start
renderer: setColorScheme
renderer: Renderer() end
Compile and preview finished.
Total rendering time: 0:00:00.219

I'll try a later dev, but can't run the latest due to #4003.

@thehans
Copy link
Member

thehans commented Jan 18, 2022

Still reproducible on Linux Mint 20.2 with nightly dev build. @ChrisCoxArt Did you run with --debug=all ?
Also, the messages display in the OpenSCAD's GUI Console, it can be confusing since some debug messages go to stdout, and some to Console.

@MichaelAtOz
Copy link
Member Author

OpenSCAD 2021.12.14 via snap on Debian.

OpenSCAD 2021.12.14 
https://www.openscad.org/
 
Copyright (C) 2009-2021 The OpenSCAD Developers
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
 
QSettingsCached: QSettings::setValue(): recentFileList = ''
QSettingsCached: QSettings::setValue(): recentFileList = ''
Loaded design '/snap/openscad-nightly/2990/usr/share/openscad-nightly/examples/Parametric/candleStand.scad'.
QSettingsCached: QSettings::setValue(): view/showAxes = 'true'
QSettingsCached: QSettings::setValue(): view/showScaleProportional = 'true'
QSettingsCached: QSettings::setValue(): view/orthogonalProjection = 'true'
 
Parsing design (AST generation)...
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
comment_parser: ERROR IN PARAMETER: Parser error in comments of file 
 
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Polygon2d-CGAL: Polygon2d::tessellate(): 1 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 1 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 2 outlines
Polygon2d-CGAL: Polygon2d::tessellate(): 2 outlines
Geometries in cache: 11
Geometry cache size in bytes: 315376
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 53 elements!
renderer: Renderer() start
renderer: setColorScheme
renderer: Renderer() end
renderer: Renderer() start
renderer: setColorScheme
renderer: Renderer() end
Compile and preview finished.
Total rendering time: 0:00:00.022
renderer: setColorScheme

@MichaelAtOz
Copy link
Member Author

I can't test 'latest' functional Windows dev 2021.10.19 mentioned in #4003, due to #3719.

@ChrisCoxArt
Copy link
Contributor

ChrisCoxArt commented Jan 18, 2022

OK, why can't I reproduce this on MacOS? Was something fixed recently, or is there a platform difference in parsing for some reason?
And yes, I know where the errors are displayed in the GUI.

@ChrisCoxArt
Copy link
Contributor

ChrisCoxArt commented Jan 18, 2022

Yay! I got it to happen. Still not sure why it wasn't happening earlier.
OK, the yyerror for the comment parser always returns the same string, no matter what caused the error.
But in this case, the error is because we were trying to parse an empty string. And that's easy to solve.

ChrisCoxArt added a commit to ChrisCoxArt/openscad that referenced this issue Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants