Questions tagged [parsing]

Questions about built-in/custom parsers or parsing techniques.

E.g.:

Etc etc.

92 questions
5
votes
1 answer

How to determine if RHS of first order ODE is separable or linear or neither? Parsing problem

Introduction This is really a parsing question. But the context is that given the right side of first order ode, I want to automatically determine the class of the RHS. It can be either separable, or linear. If it is none of these, then I can do…
Nasser
  • 143,286
  • 11
  • 154
  • 359
4
votes
1 answer

When does Mathematica insert parenthesis into expression?

expr//HoldForm usually returns identical expressions as input, but sometimes parenthesis are inserted. I tried to interpret this behavior as an attempt to eliminate ambiguity, but some observation shows that it does not seem to be the real purpose.…
vapor
  • 7,911
  • 2
  • 22
  • 55
3
votes
2 answers

Custom bracket parser

I have a function $F$ taking arbitrarily many arguments from ${a,c,z}$ where practically (technically it isn't) $a$ works as an opening bracket and $z$ as a closing. ($c$ stands for a value.) Double brackets around a value shall cancel, but if I…
Hauke Reddmann
  • 1,043
  • 7
  • 11
1
vote
2 answers

How is a single tilde parsed?

How is a~b parsed and evaluated? I would expect an error, but it goes through without any complaints, yielding no apparent output. At first I thought it evaluated to Null, but then I realized every expression I've tried containing a~b (either…
jjc385
  • 3,473
  • 1
  • 17
  • 29
0
votes
2 answers

Extracting part of an expression

My goal is to solve $(\alpha - \dfrac{1}{\alpha}) - (\beta- \dfrac{1}{\beta}) = \dfrac 1 n$ where $\alpha$ and $\beta$ are rational and $n$ is a positive integer. Towards finding a particular solution, we will let $\beta = \dfrac{u}{v \alpha}$ where…
0
votes
0 answers

Parsing of WL code

Upon opening a .wl file someone send me I noticed that about 20 seconds were spend parsing the file. Sometimes it spends less time doing so for much bigger files. Upon looking up the term "parsing" in the documentation center I found no information…
Gert
  • 1,530
  • 8
  • 22