Discussion: Building Mathmatical Maturity by Re-stating Mathematical Claims
From the forum: Sam's Essays
This thread was started by: yourfriendrick.
Discussion start time: 2011-02-19 13:28:44.
From the forum: Sam's Essays
This thread was started by: yourfriendrick.
Discussion start time: 2011-02-19 13:28:44.
From: yourfriendrick.
Subj: Building Mathmatical Maturity by Re-stating Mathematical Claims
Date: 2011-02-19 13:28:44.
Subj: Building Mathmatical Maturity by Re-stating Mathematical Claims
Date: 2011-02-19 13:28:44.
Nope, though that definitely sounds like a more intelligent, less brute-force way to go about it. No, I basically parsed the formulas by brute force, parsing them into some pretty bare C structures arranged in a tree, and then the process of converting to prenex normal form is basically a recursion chase.
There are a bunch of books with titles like "How to write your own compiler." Are you working from one of those, or are you working from some other base of texts. (I've got to assume that anyone who parses text by "brute force" and C is using some kind of text, even if it's just a book on regular expressions.
>There are a bunch of books with titles like "How to write your own compiler." Are you working from one of those, or are you working from some other base of texts. (I've got to assume that anyone who parses text by "brute force" and C is using some kind of text, even if it's just a book on regular expressions.
It's just pointer arithmetic. In C, a string is just an array of bytes terminated by a zero byte. So manipulating strings is just a matter of manipulating an array. For example, if you want to get rid of all the spaces in a string, you can create a buffer array, and then sweep through the source string, copying its elements into the destination string whenever they're not spaces.
I learned string manipulation when I was a MUD coder, extending and maintaining the SMAUG codebase.
It's just pointer arithmetic. In C, a string is just an array of bytes terminated by a zero byte. So manipulating strings is just a matter of manipulating an array. For example, if you want to get rid of all the spaces in a string, you can create a buffer array, and then sweep through the source string, copying its elements into the destination string whenever they're not spaces.
I learned string manipulation when I was a MUD coder, extending and maintaining the SMAUG codebase.