Commit Graph

109 Commits

Author SHA1 Message Date
Justin J. Meza 6762b72436 Merge pull request #41 from talonbragg/patch-1
Make readme look better
2017-04-13 14:43:55 -07:00
Talon Bragg e4d6a8e6e1 Make readme look better 2017-04-13 12:32:42 -07:00
Justin J. Meza 8a06bf0111 Merge pull request #16 from danielpronych/master
Update README
2017-04-11 15:45:33 -07:00
Justin J. Meza 181f4b3a23 Merge pull request #40 from RedBow/master
Gitignore the generated files
2017-04-11 15:44:26 -07:00
Kimberlee Model ea761978fc Manually removed some of the rsync output that isnt file names 2017-04-11 18:17:33 -04:00
Kimberlee Model 808f122661 so the first one didn't work exactly right so this is it now 'rsync -rv --size-only --dry-run lci2/ lci/ >> lci/.gitignore' 2017-04-11 18:14:25 -04:00
Kimberlee Model a415a82e8b adding a .gitignore file generated to hide files made during build. generated using rsync -rv --dry-run lci2/ lci/ >> lci/.gitignore where PWD is the parent directory of lci/ and lci2/ (which are both copies of the lci repo), and lci2 has been built, and lci is completely clean. 2017-04-11 17:54:20 -04:00
Justin J. Meza d42043c33b fixing interpolated string assignment 2016-03-27 14:01:37 -07:00
Justin J. Meza 4a33fc0df4 Merge pull request #31 from donabrams/master
fix read for input length 2^n, n > 4
2016-03-27 13:10:19 -07:00
Don fb0f233a90 fix write out of bounds where \0 was written outside of allocated memory if input length was exactly 2^n where n > 4 2015-12-14 22:26:17 -07:00
Justin J. Meza 11acb971f4 Merge pull request #30 from 0x0dea/has-an-alternative-article
add HAS AN keyword for grammatically correct declarations
2015-08-30 15:38:24 -07:00
Justin J. Meza 9173a12080 Merge pull request #29 from 0x0dea/relaxed-numeric-conversion
relax numeric conversions from string
2015-08-30 15:37:35 -07:00
Justin J. Meza b1ae721da5 Merge pull request #27 from 0x0dea/invisible
add INVISIBLE operator for writing to stderr
2015-08-30 15:36:27 -07:00
D.E. Akers 31168c6b93 add HAS AN keyword for grammatically correct declarations
http://forum.lolcode.org/viewtopic.php?f=4&t=13#p19
2015-08-15 23:19:36 -04:00
D.E. Akers f48feda78a relax numeric conversions from string
The spec does not establish any particular constraints to observe in
casting from `YARN` to `NUMB(A)R`. Presently, `lci` checks that the
string consists only of numeric characters prior to attempting the
conversion, halting with an error if it's found not to be the case.

This behavior is often more inconvenient than helpful. Many numeric
strings encountered in the wild are "roughly numeric", and it would be
wise to account for this observation. As a simple example, a user may
be prompted to input a number; in the case of their inadvertently
providing leading or trailing whitespace, a naive program will crash
rather than gracefully extracting the otherwise sensible input.

This patch removes the `isDecString()` function and instead leverages
the `strtoll()` and `strtof()` functions to handle casts from `YARN`
to `NUMBR` and `NUMBAR`, respectively. Thus, strings to be converted
are permitted to contain leading whitespace, and trailing non-numeric
characters are ignored. Additionally, `YARN`s to be cast to `NUMBR`
may lead with `"0"` or `"0x"` to indicate that the string should be
interpreted as an octal or hexadecimal value, respectively.

This change required the modification of several tests which previously
checked that casting an empty or completely non-numeric `YARN` resulted
in an error. These now verify that such a conversion results in a zero
of the appropriate type.
2015-08-15 19:43:05 -04:00
D.E. Akers ffbee16a2d add INVISIBLE operator for writing to stderr
Printing warnings and the like to the standard error stream is common
courtesy, not least because it avoids cluttering the program's output
with diagnostic messages.

Neither the 1.2 specification nor any of the proposals for 1.3 mention
using `INVISIBLE` for this purpose. Nevertheless, the operator and the
behavior described herein have seen sufficiently wide adoption in other
LOLCODE interpreters that I believe `lci` would do well to follow suit.

This patch attempts to be minimally invasive. Rather than adding a new
node type and all that that entails, the `PrintStmtNode` structure now
has a `FILE *` field containing the file to which the node should print
during interpretation. This saves a branch in `interpretPrintStmtNode()`
at the cost of making the structure negligibly larger on most systems.

Adding tests for `INVISIBLE` would require rethinking the test driver,
which presently uses the existence of output on `stderr` to detect that
an "expected error" has occurred. I'll happily try my hand at making the
necessary modifications if this patch comes to be accepted.
2015-08-13 18:24:26 -04:00
Justin J. Meza 75b2b31eed Merge pull request #25 from Quiri/master
typo make docs
2015-05-10 10:01:54 -07:00
kirill Mint c472961679 typo make docs 2015-05-02 21:56:38 +02:00
Justin Meza 60bb38a1f0 adding Travis CI configuration file 2015-04-12 16:29:59 -07:00
Justin Meza 7200aa9308 adding unhandled string detection error type 2015-04-12 16:28:56 -07:00
Justin Meza 30301eb2a9 Merge branch 'technion-versioncrash' 2015-04-12 16:22:59 -07:00
Technion 8c66da0667 Defensive strategy that prevents a range of possible null pointer errors from causing crashes
This allows a graceful failure in the event of several identified invalid inputs.
2015-04-12 22:38:18 +00:00
Justin J. Meza e017dc68c0 Merge pull request #22 from ord-nas/master
Fixed problem with ME when using alternate method calling syntax
2014-11-26 21:09:49 -08:00
OrdNas 3fe31d043d Fixed problem with ME when using alternate method calling syntax 2014-11-26 17:58:53 -08:00
Justin Meza 00fb94d9b3 fix missing runtime array type check identified by LeartS 2014-10-24 21:57:44 -07:00
Justin Meza 9420332149 fix induction variable update bug identified by LeartS 2014-10-23 22:59:53 -07:00
Daniel Pronych 4c2425e028 Update README
Submit fix to a minor spelling error in the README file.
2014-08-29 12:00:39 -06:00
Justin Meza a315f2bac3 updated webpage 2014-04-21 00:51:10 -04:00
Justin Meza ffdcf19de2 updating README and bumping version 2014-04-21 00:47:04 -04:00
Justin Meza 9381c726b5 added GPLv3 2014-04-21 00:07:12 -04:00
Justin Meza 29677d77ed removed Clang warnings 2013-12-30 12:45:34 -05:00
Justin Meza 0aaa1c9767 added support for Unicode v6.3 2013-12-19 13:35:59 -05:00
Justin Meza 13b08ef469 fixed function resolution issue pointed out by markjreed 2013-10-05 15:09:30 -04:00
Justin Meza d842000e01 minor comment formatting 2013-10-04 23:18:03 -04:00
Mark J. Reed 4cf3583c63 use long long integers instead of ints 2013-10-04 12:17:19 -04:00
Justin Meza e30981166d fixed install script 2013-03-17 19:34:48 -04:00
Justin Meza 483c70d50e added support for Unicode v6.2 2013-03-12 11:04:57 -04:00
Justin Meza 72a524a78c minor infrastructure updates 2013-03-02 12:52:32 -05:00
Justin Meza f5e02cb20c updating license info 2013-01-29 23:53:01 -05:00
Justin Meza f19e8b7ec1 fixed some merge issues 2013-01-29 23:49:42 -05:00
Justin J. Meza 21359c04ef removing old test files 2012-12-26 14:21:43 -08:00
Justin J. Meza 80a4bd083c finally switching master over to future 2012-12-26 13:12:12 -08:00
Justin J. Meza b27e3d1e73 updated Doxygen info 2012-12-26 12:46:07 -08:00
Justin J. Meza 5751d3fd42 minor bookkeeping changes 2012-12-13 00:02:17 -05:00
Justin J. Meza b74839d704 new error infrastructure added 2012-12-12 23:53:54 -05:00
Justin J. Meza 5e8d706cf0 started adding new error infrastructure 2012-03-24 11:58:04 -04:00
Justin J. Meza 04702308c8 updated release version 2012-02-17 23:22:25 -05:00
Justin J. Meza 508194029a updated release version 2012-02-17 23:21:57 -05:00
Justin J. Meza 71f5c6ba11 added support for Unicode v6.1.0 2012-02-04 12:00:14 -05:00
Justin J. Meza ce747b9f09 added support for Unicode v6.1.0 2012-02-03 21:44:48 -05:00