Operators comprised more than one symbols #308
Answered
by
orbitalquark
nsgnkhibdk2cls0f
asked this question in
Q&A
Replies: 3 comments 4 replies
-
As written, lexers will match your '>>', ':=', etc. one character at a time, giving the appearance of matching distinct operators. If you want to match multiple characters at once, use ordered choice: `P('<<') + '>>' + S('+-*/'`
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
nsgnkhibdk2cls0f
-
Same principle as with multi-line comments...
…On Sat, 17 Dec 2022 at 00:44, nsgnkhibdk2cls0f ***@***.***> wrote:
Could you give me the full line as an example?
—
Reply to this email directly, view it on GitHub
<#308 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZKU4ASQF2AIWVVEOD4I23WNT5D7ANCNFSM6AAAAAATAZOULE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On lexer file, operators is defined as a string without any delimiter between the symbols like this:
Then how could we handle operators comprised more than one symbols like
>>
,<<
,>>>
,<<<
,->
,<>
,:=
,...?Beta Was this translation helpful? Give feedback.
All reactions