summaryrefslogtreecommitdiff
path: root/preprocessor.py
AgeCommit message (Collapse)Author
2015-01-20Get rid of the preprocessor.yenatch
extras is no longer required to build.
2014-02-06preprocessor: import commands `sound` and `noise`yenatch
2014-02-01Get rid of globals.asmyenatch
This breaks the build until labels are exported again!
2014-02-01preprocessor: actually call update_globals()yenatch
This is about to be removed, but it may as well work first.
2013-12-25preprocessor: rename macro class Wait to BattleAnimWaityenatch
2013-12-19preprocessor: battle animation macrosyenatch
2013-12-09prequeue: dont initialize a new preprocessor for each fileyenatch
2013-11-07import some new sound classes from pokemontoolsyenatch
2013-09-26fix a typo related to configurationBryan Bishop
2013-09-24bump pokemontools to v1.4.1Bryan Bishop
Note that gbz8disasm doesn't work at the moment.
2013-09-02update preprocessor to use a classBryan Bishop
2013-08-31Merge branch 'master' into refactor-preprocessorBryan Bishop
Conflicts: preprocessor.py Also bump the extras submodule to a version of pokemontools with a suitable version of the preprocessor. The changes from 'master' for preprocessor.py have been inserted into pokemontools prior to the submodule bump.
2013-08-31Merge pull request #185 from kanzure/preprocessor-performanceBryan Bishop
Preprocessor performance improvements. This recliams 0.4 seconds.
2013-08-31give preprocessor.py a main()Bryan Bishop
2013-08-31even better performance for read_lineBryan Bishop
2013-08-31better read_line performance in preprocessorBryan Bishop
Jump out of read_line early if the line is an empty string or a newline.
2013-08-31don't call load_pokecrystal_macros 2000 timesBryan Bishop
Also, don't call make_macro_table 2000 times by only calling it once and passing the result.
2013-08-31move macro sanity check into separate functionBryan Bishop
This moves out from macro_translator the macro/param length sanity check into a function called check_macro_sanity.
2013-08-31Merge branch 'master' into preprocessor-macro-functionBryan Bishop
2013-08-31Merge branch 'master' into preprocessor-assertsBryan Bishop
2013-08-31refactor preprocessor macros into a functionBryan Bishop
Remove the "macros" global and instead use a function to construct a list of macros.
2013-08-31make a MacroException more verbose in preprocessorBryan Bishop
2013-08-31convert a macro_translator assert in preprocessorBryan Bishop
AssertionError -> PreprocessorException
2013-08-31raise MacroException instead of ExceptionBryan Bishop
A more specific exception means that error handling can actually work in the future.
2013-08-31fix "raise Exception" formatting in preprocessorBryan Bishop
2013-08-31replace an assert in macro_translatorBryan Bishop
Use a MacroException instead of an AssertionError.
2013-08-31generic preprocessor-specific exception classesBryan Bishop
These are basic python Exception subclasses that can be used to throw more specific errors and exceptions from within the preprocessor. AssertionError is not a good idea.
2013-08-31remove the do_macro_sanity_check globalBryan Bishop
2013-08-31remove the show_original_lines globalBryan Bishop
2013-08-31remove an Exception from preprocessorBryan Bishop
It wasn't meant to be left in there anyway.
2013-08-30remove ItemFragment from preprocessorBryan Bishop
It's not required. see #178
2013-08-30remove "skippable_macros" from preprocessorBryan Bishop
The preprocessor no longer has the concept of skippable_macros and now always skips any line that starts with "db" or "dw" because neither of these should be treated as macros. fixes #178
2013-08-30HACK: re-instate the ItemFragment macro hackBryan Bishop
This is to fix the preprocessor temporarily. Maybe ItemFragment can be removed completely.
2013-08-28move main preprocessor into pokemontoolsBryan Bishop
Only pokecrystal-specific preprocessor stuff lives in preprocessor.py now. The other stuff lives in pokemontools.
2013-08-28two more unused imports from preprocessorBryan Bishop
2013-08-28don't use globals in the preprocessorBryan Bishop
Macros are now passed around as lists and dicts.
2013-08-28use generic skippable macros in preprocessorBryan Bishop
This removes TextEndingCommand from the preprocessor. Instead, there is a generic concept of a skippable type of macro like "db". This adds SkippableMacro to the preprocessor.
2013-08-28don't directly reference two macro classesBryan Bishop
Ideally the macro classes will be removed from the preprocessor core soon, there's no reason they should be infecting these functions.
2013-08-28remove MoneyByteParam from preprocessorBryan Bishop
It didn't belong in there. All of the references were removed.
2013-08-28Merge branch 'master' into remove-another-moneybyteparam-special-caseBryan Bishop
2013-08-28remove another MoneyByteParam special caseBryan Bishop
This updates the preprocessor to just look for a from_asm method on the class for the parameter it's processing. If there's a from_asm method, then it uses it to spit out the right asm.
2013-08-28remove a special case for MoneyByteParamBryan Bishop
The preprocessor should ideally have no special cases for macros at all in the first place. But it does. This one doesn't seem to be necessary.
2013-08-27Merge branch 'master' into remove-extrasBryan Bishop
2013-08-03fix preprocessor imports for the latest submoduleBryan Bishop
I am surprised this worked. Maybe it's not actually working, and I just have cached files everywhere.
2013-07-31jp char ァyenatch
2013-07-10chars: ▷yenatch
2013-06-25don't mix tabs/whitespaceBryan Bishop
2013-06-25pre: restore separate_comment's behavioryenatch
2013-06-21preprocess asm files individuallyyenatch
this fixes a lot of previous hacks first off, rgbds requires that labels from includes be marked as globals. instead, 3626ddeb stuffed includes into the parent file in the preprocessor. this meant one huge file got preprocessed every time, adding an additional ten seconds to compile time. running the preprocessor once for each file would create too much overhead, so a list is fed into prequeue.py, which then makes calls to preprocessor.py. this paves the way for compiling source files separately some day. next, compiling previously required `make clean` to be executed first. f3340de6 touched main.asm to force a fresh compile instead. this behavior has been reverted. now, `make all` will only attempt to recompile if a source file has changed. preprocessor.py has some marginal changes. prequeue.py is created to keep the original functionality of preprocessor.py intact. so many files are preprocessed on first compile (1951 as of this commit) that the prequeue call has been hidden. compile time is reduced to 15-30 seconds on first compile, and 5-10 seconds subsequently. the majority of this time is spent in rgbasm.
2013-05-15preprocessor: minor optimization in separate_commentyenatch