Benjamin Attal
a1066dd093
Modify parser/__init__.py so that it communicates with the Java parsing process and reads a result back from a unique file. Add template files for Java parsers.
10 anni fa
Benjamin Attal
3bc748242d
Refactor parser/__init__.py for new parsing mechanism
10 anni fa
Benjamin Attal
a8f918f7c4
Update class names. Move language ids to languages.py
10 anni fa
Benjamin Attal
0a57cf50e6
Add first version of the c parser
Add:
c.py
- CTreeCutter class is very similar to PyTreeCutter. It utilizes
self.cache as opposed to PyTreeCutter which doesn't yet.
- CTreeCutter visit functions simply add start and end lines of
the node to the cache, and visit_Decl pushes the cache onto
accum.
- parse_c performs a task identical to parse_py. However, many
c files need to be pre-processed before they are parsed.
10 anni fa
Benjamin Attal
847410b13c
Minor fix-ups in python parser.
Mod:
python.py
- Add self.cache to allow for saving of unassocaited metadata as the
PyTreeCutter moves down the syntax tree.
- Update docstrings.
10 anni fa
Benjamin Attal
d485b87f21
Fix docstring in bitshift/parser/python.py
10 anni fa
Benjamin Attal
b77db873c1
Refactor parsing in python by adding node visitor class. Performs same
tasks as previous version, but is more concise.
Add:
bitshift/parser/python.py:
Add PyTreeCutter class to perform actions on specific nodes.
10 anni fa
Benjamin Attal
4d8c818c05
Corrected documentation in bitshift/codelet.py and
bitshift/parser/__init__.py
10 anni fa
Benjamin Attal
5db273a773
Bugfixes for _serialize function in bitshift/parser/python.py
10 anni fa
Benjamin Attal
0c5e4572f8
Add placeholder functions for parsing c and java in bitshift/parser. Add parse_py function with helper functions. Parse_py grabs relevant information on variables, functions, and classes from abstract syntax tree of codelet code.
10 anni fa
Benjamin Attal
903e4ccc05
Add constants in bitshift/config.py for languages instead of just strings.
10 anni fa
Benjamin Attal
efdcb3793a
Add docstrings for functions in parser. Add ivar for syntax tree to codelet documentation.
10 anni fa
Benjamin Attal
d88e68e16e
Add dispatch 'parse' function to parser __init__.py. Basic code language identification as well. Included pycparser as a depedency.
10 anni fa
Ben Kurtovic
0c68988982
CREATE THE THINGS
10 anni fa