Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

kornelski/objc2grammar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

No Maintenance Intended

To use this you'll need SableCC 3.

java -jar sablecc/lib/sablecc.jar objc2.sablecc3

And of course you'll have to write code that instantiates Parser and does something useful with it.

C source files using typedef cannot be parsed with parser that has lexer and parser nicely separated. As a temporary workaround, I've extended SableCC's parser to recognize some basic Cocoa types — see net/pornel/objc2/hack/PreprocLexer.java.

Grammar skips preprocessor rules. It's a good idea to use existing preprocessor with it, e.g.:

gcc -E test.m

About

Objective-C 2.0 grammar for SableCC 3 parser. Allows reading of Objective-C source files into abstract syntax tree.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages