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

Fails to parse a phi expression #2769

Closed
deemp opened this issue Jan 11, 2024 · 9 comments
Closed

Fails to parse a phi expression #2769

deemp opened this issue Jan 11, 2024 · 9 comments
Assignees
Labels

Comments

@deemp
Copy link
Member

deemp commented Jan 11, 2024

We get a parsing error in eoc unphi in an objectionary/normalizer pipeline (link).

EO version: 0.34.2

Source EO code

[args] > app
  QQ.io.stdout > @
    "Hello, world!\n"

Generated phi expression

{app ↦ ⟦args ↦ ∅, φ ↦ Φ.org.eolang.io.stdout(α0 ↦ Φ.org.eolang.string(α0 ↦ Φ.org.eolang.bytes(Δ ⤍ 48-65-6C-6C-6F-2C-20-77-6F-72-6C-64-21-0A)))⟧}

Normalized phi expression

{ ν ↦ ⟦ Δ ⤍ 01- ⟧, app ↦ ⟦ ν ↦ ⟦ Δ ⤍ 00- ⟧, args ↦ ∅, φ ↦ Φ.org.eolang.io.stdout (α0 ↦ Φ.org.eolang.string (α0 ↦ Φ.org.eolang.bytes (Δ ⤍ 48-65-6C-6C-6F-2C-20-77-6F-72-6C-64-21-0A))) ⟧ }

Error

[eo:phi-to-xmir] 0ms; 1035 files generated so far...[eo:phi-to-xmir] 2s; 1035 files generated so far...[eo:phi-to-xmir] 3s; 1035 files generated so far...[eo:phi-to-xmir] 4s; 1048 files generated so far...[ERROR] 1 files with parsing errors were found: [app.phi]
Error:  Failed to execute goal org.eolang:eo-maven-plugin:0.34.2:phi-to-xmir (default-cli) on project eoc: 'org.eolang.maven.UnphiMojo@7d986d83' execution failed: java.lang.IllegalStateException: 1 files with parsing errors were found: [app.phi] -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The command "/opt/hostedtoolcache/node/20.10.0/x64/lib/node_modules/eolang/mvnw/mvnw eo:phi-to-xmir -Deo.version=0.34.2 -Deo.hash=0.34.1 --quiet -Deo.sourcesDir=/home/runner/work/normalizer/normalizer/pipeline -Deo.targetDir=/home/runner/work/normalizer/normalizer/pipeline/.eoc -Deo.outputDir=/home/runner/work/normalizer/normalizer/pipeline/.eoc/classes -Deo.generatedDir=/home/runner/work/normalizer/normalizer/pipeline/.eoc/generated-sources -Deo.placed=/home/runner/work/normalizer/normalizer/pipeline/.eoc/eo-placed.csv -Deo.placedFormat=csv -DunphiInputDir=/home/runner/work/normalizer/normalizer/pipeline/.eoc/phi -DunphiOutputDir=/home/runner/work/normalizer/normalizer/pipeline/.eoc/unphi --batch-mode --color=never --update-snapshots --fail-fast --strict-checksums" exited with #1 code
Error: Process completed with exit code 1.
@maxonfjvipon
Copy link
Member

@deemp your normalized expression is not parsed because of the spaces.

  • { ν ↦ , should be {ν ↦
  • ⟦ Δ ⤍ 01- ⟧,, should be ⟦Δ ⤍ 01-⟧,

I think it's a bug and we should allow such spaces

@maxonfjvipon
Copy link
Member

But I think space in application should not be allowed: Φ.org.eolang.io.stdout (α0 ->, should be Φ.org.eolang.io.stdout(α0 ->
@yegor256 WDYT?

@yegor256
Copy link
Member

@maxonfjvipon I think we should treat ALL spaces as non-important terminals and just remove them. Thus, any number of spaces (and EOLs) in any place of the text should not break the syntax.

@maxonfjvipon maxonfjvipon self-assigned this Jan 12, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 12, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 12, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 12, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 12, 2024
@maxonfjvipon
Copy link
Member

@yegor256 let's make a new release with tag 0.34.3

@yegor256
Copy link
Member

@rultor release, tag is 0.34.3

@rultor
Copy link
Contributor

rultor commented Jan 13, 2024

@rultor release, tag is 0.34.3

@yegor256 OK, I will release it now. Please check the progress here

@rultor
Copy link
Contributor

rultor commented Jan 13, 2024

@rultor release, tag is 0.34.3

@yegor256 Done! FYI, the full log is here (took me 35min)

@maxonfjvipon
Copy link
Member

maxonfjvipon commented Jan 13, 2024

@deemp please update EO version to 0.34.3 and let us know if the issue is resolved

@deemp
Copy link
Member Author

deemp commented Jan 13, 2024

Thanks! Runs successfully

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

No branches or pull requests

4 participants