Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

311 Mini Lexer

Takes key file and program files. After storing the keys, outputs program files with identifier flags: keyword* , var_first_time? , var_later@ . These are separated by a single space or a new line.

Accomplishes this via a structure like a flat trie. Has a first char leaf, and then a string of the remaining characters, plus a sparse list of indicies to also check, trie style.

For CPP CS 311, winter 2013.

Compliant. Run with java 1.6+

  • javac Project2.java
  • java Project2 InputFile1.txt InputFile2.txt [> out.file]

License

You can copy/use this code at your own risk, provided it isn't for a school project. In that case, you can only view it as reference material.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.