Re: Tokens for Methods?

2016-11-10 Thread John DeSoi

> On Nov 10, 2016, at 8:55 AM, Richard Wright  
> wrote:
> 
> I want to create a complete call chain (there may be several) of a given 
> method. I know I can do this manually but it’s pain in complicated 
> structures. If I could find a way to determine all methods called by a given 
> method, I could do this for each method, store the info in database and 
> easily create my call chain. In other words, I want to parse all methods like 
> 4D Insider did and then used the parsed information to create the call chain 
> in one easy step. I’m only interested in methods at this point. The latest 
> Get Method Code does return some tokens, but not for methods; otherwise I 
> could use that. 

Unless 4D provides a command to get this information, I don't think there are 
any shortcuts - you need a real parser. You can get part of the way there in 
4D, but it is a very long road to get it right. You are better off using a 
language that has a parser generator. I wrote one in Lisp. If you want better 
direct integration with 4D, there are several parser generators available for 
Javascript.

John DeSoi, Ph.D.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Tokens for Methods?

2016-11-10 Thread Richard Wright
I want to create a complete call chain (there may be several) of a given 
method. I know I can do this manually but it’s pain in complicated structures. 
If I could find a way to determine all methods called by a given method, I 
could do this for each method, store the info in database and easily create my 
call chain. In other words, I want to parse all methods like 4D Insider did and 
then used the parsed information to create the call chain in one easy step. I’m 
only interested in methods at this point. The latest Get Method Code does 
return some tokens, but not for methods; otherwise I could use that. 


> Date: Thu, 10 Nov 2016 01:33:39 +0100
> From: Keisuke Miyako 
> 
> would you be willing to share what is it you want accomplish?
> normally I would select a method in the Explorer and "search for 
> dependencies" from the context menu.
> the result contains the method it self, which is a bit weird, but you can 
> drag and drop the list to any text editor.
> 
>> 2016/11/10 7:18、Richard Wright  のメール:
>> Does anyone know how 4D tokenizes method names? I can get the method 
>> resource into a blob using API Pack and would very much like to be able to 
>> extract all methods that are called.
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Tokens for Methods?

2016-11-09 Thread David Adams
Yeah, not much sleep. If you did want to go with the brute-force method,
you would also need to (at the least):

* Excise all comments first.

* Figure out what to do about Begin/End SQL blocks.

* Figure out what to do with things that are named the same, like
fields/vars/methods.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Tokens for Methods?

2016-11-09 Thread Keisuke Miyako
would you be willing to share what is it you want accomplish?
normally I would select a method in the Explorer and "search for dependencies" 
from the context menu.
the result contains the method it self, which is a bit weird, but you can drag 
and drop the list to any text editor.

> 2016/11/10 7:18、Richard Wright  のメール:
> Does anyone know how 4D tokenizes method names? I can get the method resource 
> into a blob using API Pack and would very much like to be able to extract all 
> methods that are called.



宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

keisuke.miy...@4d.com
www.4D.com/JP

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Tokens for Methods?

2016-11-09 Thread Richard Wright
Does anyone know how 4D tokenizes method names? I can get the method resource 
into a blob using API Pack and would very much like to be able to extract all 
methods that are called.


Richard Wright
DataDomain
rwri...@datadomainsoftware.com


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**