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

How to use EoSyntax class? #3380

Closed
volodya-lombrozo opened this issue Sep 23, 2024 · 13 comments
Closed

How to use EoSyntax class? #3380

volodya-lombrozo opened this issue Sep 23, 2024 · 13 comments

Comments

@volodya-lombrozo
Copy link
Member

I'm trying to parse EO file by using EoSyntax class:

new EoSyntax("name?", new InputOf(this.toEo())).parsed()

The problem here is the first parameter nme. I just don't know what it is and what I should pass. I guess, it's some name.
Should EoSyntax know my name to parse EO files?

new EoSyntax("Volodya", new InputOf(this.toEo())).parsed()

Is it for blaming purposes? Well... I tried to open EoSyntax class to read the javadoc about this parameter:

    /**
     * Ctor.
     *
     * @param nme The name of it
     * @param ipt Input text
     */
    public EoSyntax(final String nme, final Input ipt) {
        this.name = nme;
        this.input = ipt;
    }

"The name of it". It? What "it" should I pass?

@volodya-lombrozo
Copy link
Member Author

volodya-lombrozo commented Sep 23, 2024

@yegor256 @maxonfjvipon Could you help me, please?

yegor256 added a commit that referenced this issue Sep 23, 2024
@yegor256
Copy link
Member

@volodya-lombrozo see the changes in a0f2e2b

@volodya-lombrozo
Copy link
Member Author

@yegor256 If this parameter is needed only for "the sake of traceability", may be we can add one more constructor to EoSyntax that would pass a dummy name? Otherwise I don't know which value to set. Can I pass any random name? Actually, I don't have any .eo file in my case - I parse it directly from XML object.

yegor256 added a commit that referenced this issue Sep 23, 2024
@yegor256
Copy link
Member

@volodya-lombrozo I agree, see 77c3fa9

@volodya-lombrozo
Copy link
Member Author

@yegor256 Looks good, thank you! Could you release these changes, please?

yegor256 added a commit that referenced this issue Sep 23, 2024
@yegor256
Copy link
Member

@rultor release, tag is 0.39.1

@rultor
Copy link
Contributor

rultor commented Sep 23, 2024

@rultor release, tag is 0.39.1

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

@rultor
Copy link
Contributor

rultor commented Sep 23, 2024

@rultor release, tag is 0.39.1

@volodya-lombrozo @yegor256 Oops, I failed. You can see the full log here (spent 10min)

                  ^
/home/r/repo/eo-runtime/src/main/java/EOorg/EOeolang/EOsys/Win32/WSAStartupFuncCall.java:83: error: cannot find symbol
    public static final class WSAData extends Structure {
                                              ^
  symbol:   class Structure
  location: class WSAStartupFuncCall
/home/r/repo/eo-runtime/src/main/java/EOorg/EOeolang/EOsys/Win32/WSAStartupFuncCall.java:117: error: cannot find symbol
        public Pointer vendorInfo;
               ^
  symbol:   class Pointer
  location: class WSAData
/home/r/repo/eo-runtime/src/main/java/EOorg/EOeolang/EOsys/Win32/WriteFileFuncCall.java:32: error: package com.sun.jna.ptr does not exist
import com.sun.jna.ptr.IntByReference;
                      ^
Command line was: /usr/lib/jvm/java-11-openjdk-amd64/bin/javadoc @options @packages

Refer to the generated Javadoc files in '/home/r/repo/eo-runtime/target/apidocs' dir.

    at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.doExecuteJavadocCommandLine (AbstractJavadocMojo.java:5197)
    at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeJavadocCommandLine (AbstractJavadocMojo.java:5070)
    at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport (AbstractJavadocMojo.java:2029)
    at org.apache.maven.plugins.javadoc.JavadocJar.doExecute (JavadocJar.java:181)
    at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute (AbstractJavadocMojo.java:1825)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[ERROR] 
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :eo-runtime
\u001b[0m\u001b[0mcontainer 2eae891d87c549e9044fc280664c1be20ffb4e66f0393016c888473b27c7a0a0 is dead
Mon Sep 23 12:15:19 UTC 2024

@yegor256
Copy link
Member

@volodya-lombrozo we'll release soon: #3381

@volodya-lombrozo
Copy link
Member Author

@yegor256 I guess, you were mistaken about the traceability: #3373 (comment)

@maxonfjvipon
Copy link
Member

This "name" is used in the name attribute of <program> tag in XMIR, so we need to extend documentation for the field in EoSyntax class.

@yegor256
Copy link
Member

@volodya-lombrozo the version 0.39.1 has been released, try it please

@volodya-lombrozo
Copy link
Member Author

@yegor256 Now the documentation looks a bit better. Thank you

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