Related: the CRAN package “nonmemica” has a function as.model() that parses NONMEM control streams. Type “?nonmemica” at the R prompt after loading. See also https://github.com/MikeKSmith/rspeaksnonmem
. Happy to discuss further.
Tim Bergsma, PhD
Certara Strategic Consulting
From: owner-nmusers_at_globomaxnm.com <owner-nmusers_at_globomaxnm.com> On Behalf Of Ruben Faelens
Sent: Thursday, June 14, 2018 4:33 AM
Subject: [NMusers] Context-free lexer for NM-TRAN
Calling all computer scientists and computer language experts.
In my spare time, I am working on a lexer and parser for NM-Tran. Primarly to teach myself about grammars and DSL, but perhaps something useful will come out of this (e.g. a context-sensitive editor with code completion).
When lexing, I am having a hard time describing the keywords used by nm-tran.
Let us take '.EQ.' as an example.
1) It seems that .EQ. is a keyword used to describe a comparison.
2) However, a filename could also be 'foo.eq.bar'
The same thing applies for keywords on the '$ESTIMATION' record. These keywords could also be used as variable names.
Am I right in saying that NM-TRAN cannot be tokenized with a context-free lexer? And that I should focus my efforts on building a lexer-less parser? (Or building my own lexer-parser, see https://en.wikipedia.org/wiki/The_lexer_hack
I assume building a parser for NM-TRAN was already done in the DDMoRe project, but I failed to find the source code...
NOTICE: The information contained in this electronic mail message is intended only for the personal and confidential
use of the designated recipient(s) named above. This message may be an attorney-client communication, may be protected
by the work product doctrine, and may be subject to a protective order. As such, this message is privileged and
confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to
the intended recipient, you are hereby notified that you have received this message in error and that any review,
dissemination, distribution, or copying of this message is strictly prohibited. If you have received this
communication in error, please notify us immediately by telephone and e-mail and destroy any and all copies of this
message in your possession (whether hard copies or electronically stored copies). Thank you.
Received on Thu Jun 14 2018 - 06:42:25 EDT