Skip to content

Bugfix for older Parse::RecDescent versions - #868

Merged
brucemiller merged 1 commit into
brucemiller:masterfrom
tkw1536:parser-runtime-warning-fix
Aug 31, 2017
Merged

Bugfix for older Parse::RecDescent versions#868
brucemiller merged 1 commit into
brucemiller:masterfrom
tkw1536:parser-runtime-warning-fix

Conversation

@tkw1536

@tkw1536 tkw1536 commented Aug 30, 2017

Copy link
Copy Markdown
Contributor

Older versions of Parse::RecDescent did not support the third argument
to parser pre-compilation introduced in
b5aa3d0. This caused installation
problems for LaTeXML on older systems.

This PR fixes the problem by introducing a fallback that does not
use the third argument. This only gets triggered when the MathGrammar is
not created.

@tkw1536

tkw1536 commented Aug 30, 2017

Copy link
Copy Markdown
Contributor Author

@brucemiller can you check if this works on your problematic systems before merging?

@tkw1536

tkw1536 commented Aug 30, 2017 via email

Copy link
Copy Markdown
Contributor Author

Comment thread Makefile.PL Outdated

$(INST_LIBDIR)/LaTeXML/MathGrammar.pm: lib/LaTeXML/MathGrammar
$(PERLRUN) -MParse::RecDescent - lib/LaTeXML/MathGrammar LaTeXML::MathGrammar Parse::RecDescent
@$(PERLRUN) -e 'exit -e ("$(INST_LIBDIR)/LaTeXML/MathGrammar.pm") ? 0 : 1;' || \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the leading @ on this line confused me enough to lose sight of the perlrun for my older question. What does leading @ do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prevents the command from being echoed out. I added that to keep users from being confused by a 'fallback' message in the command, even though it is not relevant when not called.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks for educating me!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember having known this years ago and then forgetting it, as bash syntax often goes.

@tkw1536 tkw1536 changed the title Bugix for older Parse::RecDescent versions Bugfix for older Parse::RecDescent versions Aug 30, 2017
@tkw1536
tkw1536 force-pushed the parser-runtime-warning-fix branch 2 times, most recently from fead8f6 to 0e174e5 Compare August 31, 2017 15:54
@tkw1536

tkw1536 commented Aug 31, 2017

Copy link
Copy Markdown
Contributor Author

OK, I managed to test this on an older machine, and need to make one more change for this to work.

Older versions of Parse::RecDescent did not support the third argument
to parser pre-compilation introduced in
b5aa3d0. This caused installation
problems for LaTeXML on older systems.

This commit fixes the problem by introducing a fallback that does not
use the third argument. This only gets triggered when the MathGrammar is
not created.
@tkw1536
tkw1536 force-pushed the parser-runtime-warning-fix branch from 0e174e5 to 556aaa4 Compare August 31, 2017 15:59
@brucemiller
brucemiller merged commit 7aa2401 into brucemiller:master Aug 31, 2017
@tkw1536
tkw1536 deleted the parser-runtime-warning-fix branch August 31, 2017 18:06
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

Successfully merging this pull request may close these issues.

3 participants