On Tue, Mar 10, 2015 at 1:32 PM, Amaury Forgeot d'Arc
<[email protected]> wrote:
> 2015-03-09 19:43 GMT+01:00 anatoly techtonik <[email protected]>:
>>
>> I'll start from afar, so that it will be easier to understand what I
>> am thinking about..
>>
>> CFFI uses pycparser, which parses C files, but! uses C compiler
>> to strip comments from C files and process defines, but almost
>> all .c files contain comments, so pycparser is basically useless
>> as a parser, but maybe it has a good API for working with AST.
>>
>> Anyway, I tried to see if I can teach pycparser to strip
>> comments itself, and in c_lexer.py I found a list of tokens,
>> among which there were no token representing the comment
>> start.
>
>
> This looks off-topic for PyPy or CFFI.
> Did you intend to send this message to some pycparser forum?

I'll keep in mind that 10 lines is a limit for a topic start. Let me quote
from the bottom:

--cut--
I read the ontologies is way to express relations between
object in this automatic was as triples. Like;

  COMMENTSTART is a TOKEN
  COMMENTSTART starts a COMMENT

And I wonder, have anybody tried to apply this ontology
stuff to designing and analysing computer languages?
If yes, maybe there are some databases with such
information about parsers. I would like to query names of
all tokens that represent a program comment.
--cut--

Is the discussion about language parser strategy appropriate for
pypy-dev?

-- 
anatoly t.
_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to