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

peg$SyntaxError: Expected ";", "=", comment, end of line, or whitespace but "D" found #48

Closed
JonasMS opened this issue Nov 18, 2022 · 3 comments
Labels

Comments

@JonasMS
Copy link

JonasMS commented Nov 18, 2022

I'm having trouble running solgraph.

Running the following in zsh:

node ~/.yarn/bin/solgraph Resonate.sol > Resonate.dot
Parse error
peg$SyntaxError: Expected ";", "=", comment, end of line, or whitespace but "D" found. Line: 56, Column: 31
    at peg$buildStructuredError (/Users/jonassota/.config/yarn/global/node_modules/solidity-parser-sc/build/parser.js:1376:12)
    at Object.peg$parse [as parse] (/Users/jonassota/.config/yarn/global/node_modules/solidity-parser-sc/build/parser.js:15723:11)
    at Object.parse (/Users/jonassota/.config/yarn/global/node_modules/solidity-parser-sc/index.js:34:23)
    at _default (/Users/jonassota/.config/yarn/global/node_modules/solgraph/dist/index.js:69:21)
    at /Users/jonassota/.config/yarn/global/node_modules/solgraph/dist/bin.js:23:37 {
  expected: [
    { type: 'other', description: 'whitespace' },
    { type: 'other', description: 'end of line' },
    { type: 'other', description: 'comment' },
    { type: 'literal', text: '=', ignoreCase: false },
    { type: 'other', description: 'whitespace' },
    { type: 'other', description: 'end of line' },
    { type: 'other', description: 'comment' },
    { type: 'other', description: 'whitespace' },
    { type: 'other', description: 'end of line' },
    { type: 'other', description: 'comment' },
    { type: 'literal', text: ';', ignoreCase: false }
  ],
  found: 'D',
  location: {
    start: { offset: 1643, line: 56, column: 31 },
    end: { offset: 1644, line: 56, column: 32 }
  }
}

2.node ~/.yarn/bin/solgraph Resonate.sol > Resonate.dot strict digraph { Resonate } zsh: parse error near }'`

In both cases, an empty Resonate.dot file is created.

@raineorshine
Copy link
Owner

The parser needs to be updated from solidity-parser-sc to solidity-parser-antlr or another parser that supports the latest solc. I am no longer actively working on this project but I would be happy to support a PR from anyone who is interested in contributing.

@yellowBirdy
Copy link
Contributor

The parser needs to be updated from solidity-parser-sc to solidity-parser-antlr or another parser that supports the latest solc. I am no longer actively working on this project but I would be happy to support a PR from anyone who is interested in contributing.

Would you mind reviewing my PR #49

@raineorshine
Copy link
Owner

Should be fixed in v1.0.0 thanks to @yellowBirdy.

@JonasMS If it still doesn't work, please post your Resonate.sol.

@raineorshine raineorshine changed the title Not able to run solgraph peg$SyntaxError: Expected ";", "=", comment, end of line, or whitespace but "D" found Dec 4, 2022
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

3 participants