Skip to content

rply.errors.LexingError #8

@selimaj-dev

Description

@selimaj-dev

specification

python version: 3.10.9
cpu: M1
os: macOS Ventura 13.1
MBA 2020

error

if I run it using the print(1) method it works. but if I try a str print("Hello, World") it gives this error:
rply.errors.LexingError: (None, SourcePosition(idx=0, lineno=1, colno=1))

Full error:

  return self.pg.build()
Traceback (most recent call last):
  File "/Users/klestiselimaj/Projects/lang/main.py", line 21, in <module>
    parser.parse(tokens).eval()
  File "/Users/klestiselimaj/Library/Python/3.9/lib/python/site-packages/rply/parser.py", line 32, in parse
    lookahead = next(tokenizer)
  File "/Users/klestiselimaj/Library/Python/3.9/lib/python/site-packages/rply/lexer.py", line 62, in __next__
    return self.next()
  File "/Users/klestiselimaj/Library/Python/3.9/lib/python/site-packages/rply/lexer.py", line 58, in next
    raise LexingError(None, SourcePosition(
rply.errors.LexingError: (None, SourcePosition(idx=0, lineno=1, colno=1))```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions